Re: [Dev-C++] Backslashes in Windows path and escaping
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
From: Chris M. <lor...@gm...> - 2008-03-29 17:57:02
|
On Sat, Mar 29, 2008 at 8:46 AM, Jan Mura <jan...@vo...> 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? Yes, that is correct. The '\' character is an escape character, used to make characters that are special (eg '\'' get's me a single quote mark). By escaping the escape character you get a single backwhack. -- Registered Linux Addict #431495 http://profile.xfire.com/mrstalinman | John 3:16! http://www.fsdev.net/ | http://lordsauron.wordpress.com/ |