The assignment says to:
Write a program where you enter name and value pairs (like Joe 33). For each pair, add names to a vector and scores to another vector. Terminate input with NoName 0. Check that each name is unique and terminate with an error message if a name is entered twice. Write out all (name, score) pairs, one per line.
I've got everything except "terminating" the program.
This is the test input:
Barbara 22
Janna 11
Kendall 10
Ginnie 9
Henry 18
Barbie 31
Winston 45
Joe 17
Winston 32
So once Winston repeats, it should terminate with an error message.
I have no idea how to do that. Heck, this is in the chapter before errors in my C++ textbook.
How do I terminate with an error message AS SOON AS the repeat name is entered?