how do u write a file to c:\ for example?
if u do this: ofstream ("c:\lol.dat",ios:ut) and u run the program from your desktop it will just be placed on the desktop, but when i run it directly from my cppbuilder it does go to c:\
how do u write a file to c:\ for example?
if u do this: ofstream ("c:\lol.dat",ios:ut) and u run the program from your desktop it will just be placed on the desktop, but when i run it directly from my cppbuilder it does go to c:\
If you use ofstream my_stream("c:\\lol.dat"); and write out to my_stream, it will be written to C:\lol.dat. When using backslashes inside strings in C++, you need to escape it with an extra backslash. You could also use ofstream my_stream("c:/lol.dat") since the forward slash does not need to be escaped.
aight, cool thanx