#include <iostream>
#include <string>
#include <vector>
#include <fstream>
using namespace std;
int main()
{
fstream f("C:\\Users\\han\\Desktop\\1.txt", ios::in);
vector<string> v;
for (int i = 0; i != 9; i++) {
string s;
f >> s;
v.push_back(s);
}
for (auto j : v)
cout << j << endl;
f.close();
return 0;
}
#include <iostream>
#include <string>
#include <vector>
#include <fstream>
using namespace std;
int main()
{
fstream f("C:\\Users\\han\\Desktop\\1.txt", ios::in);
vector<string> v;
for (int i = 0; i != 9; i++) {
string s;
f >> s;
v.push_back(s);
}
for (auto j : v)
cout << j << " ";
cout << endl;
f.close();
return 0;
}