Aug 25, 2012 at 4:16pm UTC
i tried to write a file..something like this
ofstream file;
file.open ("C:\\Windows\\sample.txt");
file << "blah";
it didnt created a file but i can read it using fstream
can you explain to me how that happened? does it consume space in my pc ??
thanks.
Aug 25, 2012 at 4:19pm UTC
If you can read from the file the file was probably created. What makes you think the file is not created?
Aug 25, 2012 at 4:23pm UTC
i tried to search it in search box..cant find the file
also i tried "c:\\sample.txt" cant find it in my c:\\
Last edited on Aug 25, 2012 at 4:25pm UTC
Aug 25, 2012 at 4:27pm UTC
Maybe you did a mistake in the code that reads the file.
Aug 25, 2012 at 4:31pm UTC
Did you actually look in the Windows folder? I'm not sure that the windows file search will search the system folders by default.
Aug 25, 2012 at 6:22pm UTC
If this is windows 7 and you are not running as admin, operating system will silently move the file to some virtual location (not really sure what it is exactly).