in reply to Useless Program
You're problem would be that you only ever test the first line. If this is equal to the search term, then you say it was found. Otherwise, you're saying it wasn't, appending it, and exiting the loop.
Easiest solution would be have a loop that goes through checking each line. Have a flag that you set if you find the name (and exit the loop if you do). The after the loop check the flag. If it's set, you found the name and print the apropriate message. Otherwise you ask if they want to add it.
Colin Scott
|
|---|