Text File I/O
I am fairly new to c++ and have been playing around with text file I/O. I can manage to read and write to files which are stored in the top level of the c drive but I can't access the text file if I put it into a sub folder. This is the code I have been using:
How would I access the file if it was in c:\\Documents\test.txt for example?
the \ character within a string escapes the next letter. So you need to escape it itself, hence the \\.