Thanks for your answers.
In fact, I use the code below to create file under "SYSTEM32"
ofstream myNewFile;
myNewFile.open("c:\windows\system32\newfile.txt");
myNewFile<<"this is a new file.";
myNewFile.flush();
myNewFile.close();
After running these steps, I can not find the "newfile.txt" under SYSTEM32.
But, when I use the code below to read the file, I can get the content of it:
ifstream ifs;
ifs.open("c:\windows\system32\newfile.txt");
//get data from file
ifs>>m_cBufData;
Where is the file I created?
|