1. Engineering
  2. Computer Science
  3. c language 1 update your program to now check to...

Question: c language 1 update your program to now check to...

Question details

C++ language

1. Update your program to now check to see if you have already entered that name in previous records.
Yes, this assumes that there is only ever one person with whatever name, but we’ll pretend that’s okay.
When you get the user input, you’ll have to loop through all of the previous entries to compare names
(strcmp is pretty excellent for this). If the name has already been entered, display a message and make
the user enter another name. Yes, this too should be checked.


Example Output
How many records would you like? 2
What is the name for record 1? TJ
What is the age for record 1? 38
What is the name for record 2? TJ
THERE CAN BE ONLY ONE. What is the name for record 2? Not TJ

2. Again, ask the user for how many structures they would like. Once you get the number, allocate an array
of pointers. Once they have been created, proceed to loop through and get the data as usual, and display
it back to the screen. The output should look very similar to what we’ve already been doing.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution