Hi, I was wondering if it was possible to get C++ to write a file to another directory, since it normally writes to the same directory that the program is in?
Thanks:confused:
Printable View
Hi, I was wondering if it was possible to get C++ to write a file to another directory, since it normally writes to the same directory that the program is in?
Thanks:confused:
All you need to do is create the file in the directory you want.
To be more specific: you can use absolute paths for your filenames (although platform dependant):
Or, use _chdir()Code:const char *fn = "C:\\mydir\\myfile.txt";
gg
oh....I feel soo stupid now!! hehe, thx =o)