Why doesn't this work:
#include <fstream.h>
ifstream quoteFile("C:\windows\desktop\quote.txt");
The error message basically says that it doesn't like the '\w' or the '\d' or '\q'. so how am i supposed to tell it what directory the file is in...
Printable View
Why doesn't this work:
#include <fstream.h>
ifstream quoteFile("C:\windows\desktop\quote.txt");
The error message basically says that it doesn't like the '\w' or the '\d' or '\q'. so how am i supposed to tell it what directory the file is in...
since '\' indicates an escape character, you have to escape it as well. Try...
:)Code:#include <fstream.h>
ifstream quoteFile("C:\\windows\\desktop\\quote.txt");