#include #include #include #include using namespace std; int main() { vector V; ifstream F; F.open("39steps.txt"); if (F.fail()) { cout << "Couldn't open the file\n"; exit(1); } while (true) { string W; F >> W; if (F.fail()) break; bool found = false; for (int i = 0; i < V.size(); i += 1) if (V[i] == W) { found = true; break; } if (found) continue; V.push_back(W); } F.close(); cout << "There were " << V.size() << " different words\n"; }