I am having problems understanding how to save files under the same directory for i/o programs. Can someone please explain to me how to save files under the same directory? Thanks!
I'm sorry, I'm still confused.
I am working on a program that requires to to open a text file and display it when I run my program. I used notepad on my windows laptop to write up the necessary information I needed for the text file. How can I make my program open up that text file?
The directory part is still confusing.
Sorry for the bother!
If it is is the same directory as the program you can simply type the filename. Otherwise you will have to give a full path. To open you will need ifstream instead of ofstream.