noun1.ygf has one word per line, about 500 or so wordsCode:ifstream nounlist("noun1.ygf"); if (!nounlist) cerr << "Problem: noun1list doesnt exist or is being used\n"; nounlist >> temp; cout << temp << " " << temp.length() << " " << psz << " " << psz.length() << endl; flag+=(temp==psz);
temp and psz are std string objects
psz contains some word that is being checked against the word list, lets say "shirt"
normally it would use a while loop to check each one, but i've taken it out to make the problem more noticable. it only checks one
here's the problem: the command cout << .... prints twice:
then it continuesCode:account 7 0 account 7 shirt 5
why does it do that, and how can i stop it?