#include<iostream>
#include<fstream>
#include<string>
#include<vector>
using namespace std;
int main() {
unsigned int i, j;
string filename = "Test.txt";
fstream fin;
fin.open(filename.c_str(), ios::in);
vector<string> v;
string tmp;
while (fin >> tmp)
{
v.push_back(tmp);
}
for (i = 0; i < v.size(); i++)
{
for (j = 0; j < v.size(); j++)
{
int m = j - 1;
if (v[i] == v[j]) v.erase(j-1,j);
}
}
for (auto x : v)
cout << x << endl;
getchar();
getchar();
return 0;
}
慕工程0101907
相关分类