C++ match string in file and get line number
- by Corey
I have a file with the top 1000 baby names. I want to ask the user for a name...search the file...and tell the user what rank that name is for boy names and what rank for girl names. If it isn't in boy names or girl names, it tells the user it's not among the popular names for that gender.
The file is laid out like this:
Rank Boy-Names…