#include
#include
#include
#include
#include
using namespace std;
int main()
{
ifstream sfile("1.txt");
if (!sfile)
{
cerr << "无法打开文件" << endl;
system("pause");
return -1;
}
string line;
vector<string> word;
while (getline(sfile, line))
{
word.push_back(line);
}
sfile.close();
//for (auto it :word)
vector<string>::const_iterator it = word.begin();
while (it != word.end())
{
istringstream line_str(*it);
string words;
while (line_str >> words)
cout << words << " ";
cout << endl;
++it;
}
system("pause");
return 0;
}