Searching Data in binary file
Posted on 2004-08-01
I have a name which is normally in the format firstname lastname and is stored in a binary file.
At the moment, i am only able to search thru the customer file by their firstname by using the following code
and then I read from file and compare;
if (file.eof()) break; //if end of file then stop search
In this case if customer name is stored as Mike Morrison, search will return 0 if Mrrison is input criteria. but will return 1 if Mike is input Criteria, I would like to know how to make it serch for the last name instead.