This is a small program for testing ifstream.
//testifstream.cpp
#include
Void f () {readfile.read (buffer, 1000); int count = readfile.gcount (); buffer [count] = '/ 0';}
INT main () {f (); cout << buffer; cout << readfile.gcount () << endl; // outputs the number of bytes of bytes recently read cout << buffer << Endl; // read Byte System ("Pause"); return 0;}
Description: Test file Test.cpp under Debug
Finally, I found out anything in VC.
And directly double-click EXE file under Debug files.
Finally, I put ifstream readfile ("test.cpp");
Change to IFStream Readfile ("TestifStream.cpp");
That is, open itself, this is found correctly in VC, then double-click the EXE file in the debug folder to run incorrect
This is this is a bad place to find VC:
That is, in the VC environment, look up in the PROGJET directory
Double-click EXE when you look down under the debug file in the current directory of the exe file.
Why do you want to design?
Wasted me 3 days, hehe! ! !