#include <iostream>
using std::cout;
#include <fstream>
using std::ifstream;
#include <string>
using std::string;

bool isWord(const string& w, ifstream& fs) {
	string word;
	while (fs >> word) {
		if (word == w) return true;
	}
	return false;
}

int main() {
	ifstream fs("ospd.txt");
	if (!fs) {
		cout << "failed.";
		std::cin.get();
	}
	string werd;
	cout << "Enter a word to see if it's an English word:\n";
	while (std::cin >> werd) {
		fs.clear();
		fs.seekg(0);
		cout << werd << " is";
		if (!isWord(werd, fs))
				cout << " not";
		cout << " an English word.\n\n";
		cout << "Enter a word to see if it's an English word:\n";
	}
	std::cin.ignore();
	std::cin.get();
}