Re: [Dev-C++] Backslashes in Windows path and escaping
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2008-03-29 23:16:02
|
The "native" way is the one you selected, i.e. dual backslash.
However, the "compatible" whay to do it is to use a single forward slash
instead, i.e. "../path/filename".
The C RTL on Windows will automagically translate the forward slash into a
backward slash before sending the string to the OS.
/pwm
On Sat, 29 Mar 2008, Jan Mura wrote:
> Hello,
>
> I need to put in a char const a full Windows path to a file.
> I.e. i did it as follows
>
> fopen ("..\path\filename", "r");
>
> It puts down some warnings about unknown escape characters.
> So I rewrite it to :
>
> fopen ("..\\path\\filename", "r");
>
> Is this correct?
>
> Thank you
>
> Jan Mura
> jan...@vo...
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|