Searching for an entry in a file?
I have a problem regarding the code for searching a text file. My program is able to add information, display, and save it to a text file, but I'm having trouble figuring out how to search the text file for a particular entry.
The entries in my text file look like this:
0843543 Intro to C++ HH117
I'm trying to implement a function to search the text file by the first value (ie: 0843543). I tried using a strcmp but it would not find the match.
The code for this was:
Once it finds the match I need to be able to delete it or change it. Thanks again for all the help.
cout<<"enter in course to search: ";