hi I am working with input and output with text files. I am able to read one word in a file.
but i want to know if there is a way to look for words in their fullness, because I want to be able to have a text file that saysCode:char thing; ifstream fin( "workerslog.txt" ); while(fin.get(thing)) { cout << thing; } cout << endl; fin.close();
Joe
3 5 6 7
Mike
5 6 9 2
and have the user type in the name and the program will find the name in the text file and list the information. I looked at the getline function but i don't understand cppreference.com's definition. Is there a function that seeks out words in a text file?



LinkBack URL
About LinkBacks


