#include <iostream>
#include <fstream>
using namespace std;
int main () {
char buffer[256];
ifstream myfile ("test.txt");
while (! myfile.eof() )
{
myfile.getline (buffer,100);
cout << buffer << endl;
}
return 0;
}
While it is not the end of a file, output file line by line
最新推荐文章于 2023-08-26 07:45:00 发布