in C and C++, the backslash (\) character is a special one which denotes an
Escape sequence. An escape sequence is for special characters which don't have an ordinary representation (such as a tab, a new-line, etc). or that have a special meaning within C/C++ string literal grammar, such as a double-quote character (Which usually denotes a string literal on its own).
if you wish to include a backslash character in your code as part of a string, then you must use the escape sequence for the backslash character, which is a double backslash;
\\In short, your directory paths must look something like this
"C:\\MyFolder\\MySubFolder\\Myfile.txt"In Windows, sometimes you have spaces in directory paths, which require you to use double-quotes as part of the path string. So, if you wish to use double-quote character within a string, you have the escape character for a double quote, which is
\" Have a look at this link for more escape sequences
http://www.cppreference.com/escape_sequences.htmledit - The alternative is to type your directory paths using the forward-slash character, a-la *nix. This often works in Windows too
"C:/MyFolder/MySubFolder/Myfile.txt"This post has been edited by Bench: 24 Nov, 2007 - 02:53 PM