Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <algorithm>
- #include <iostream>
- #include <fstream>
- #include <string>
- #include <iterator>
- using namespace std;
- int main()
- {
- string inputword;
- string words;
- cin >> inputword;
- ifstream fin("Words.txt");
- fin >> words;
- istream_iterator<string> eof;
- bool found = find(istream_iterator<string>(fin), eof, inputword) != eof;
- cout << found;
- system("pause");
- }
Add Comment
Please, Sign In to add comment