#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ifstream infile("data.txt");
if (!infile) {
cerr << "fail to open file!" << endl;
return -1;
}
string word;
while (infile >> word) {
cout << word << endl;
}
return 0;
}
while (cin >> word) {} demo
最新推荐文章于 2022-02-22 17:01:18 发布