Hello, my question is how to save file in line:
ofstream fout("my file.txt");
to some other location and not only to the default (where unit is saved too)? My default file is D:\Programi\Programi C++ 5. Is it possible to save this text file to any other location? Greetings, Franjo
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello, my question is how to save file in line:
ofstream fout("my file.txt");
to some other location and not only to the default (where unit is saved too)? My default file is D:\Programi\Programi C++ 5. Is it possible to save this text file to any other location? Greetings, Franjo
Type in the entire address where you want the file to go. Keep in mind the excape character though.
eg:
ofstream fout("C:\\my file.txt"); //or
ofstream fout(C:\\temp\\myfile.txt);
Also try to avoid spaces if you can, they can really mess things up at times.
Curtis