You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cerr<<"Error opening la-novs-nodups.txt file for writing."<<endl;
exit(-1);
}
cout<<"la-novs-nodups.txt opened for writing."<<endl;
set<string> vocab;
string load_a_word;
pair <set<string>::iterator,bool> ret;
while (!dictIn.eof()) {
getline(dictIn,load_a_word);
ret=vocab.insert(load_a_word);
if (ret.second) dictOut<<load_a_word<<endl; //second element of the return value pair == true if insertion added a new item, false if item already in set.