Creating/saving text files

11/28/2015 14:15 Dwarfche#1
How can I create txt file in a desired of me directory using C++?
11/28/2015 14:30 warfley#2
You could use a [Only registered and activated users can see links. Click Here To Register...]
11/28/2015 14:46 Dwarfche#3
well, i got this code:

but im curious where this text.txt file is saved
11/28/2015 15:20 Jeoni#4
It is saved in the current working direction where the program is executed (the directory of the program in many / most cases). But you can also pass an absolute path like that:
Code:
file_.open("C:\\text.txt");
In that case the file is always located as C:\test.txt regardless of where the program is executed.
With best regards
Jeoni
11/28/2015 15:28 Dwarfche#5
even like that, no text.txt file i can find in my C: disk