For most purposes choosing
std::vector over an old school array is a good bet. Especially if you need a dynamic sized container.
std::vector manages the memory for you.
I didn't really get any help or an answer. |
You got a lot of help. Very good help.
You asked several different questions. Different tasks.
1. How to do data entry for 3 different forms of data (name, place of birth, year). There are several different ways to store the input. Two possible choices are: as 3 separate variables, or as a struct.
Choosing how you store the individual pieces of your data makes choosing a container for multiple sets of data another task.
Choosing the variable type for each type of data is also critical. Name and place of birth could be
std::strings, year as an
unsigned short/int.
2. How to loop for your data entry until all the data is entered.
3. Displaying all of the entered data.
Three separate tasks. Focus on each task one at a time until you are sure it has been coded to work without fail.
If this is classroom homework paste the exact requirements statement(s) into your code as comments. So you have constant reminders of what you have to do.