With generous help, I managed to write the following the program:
#include <iostream>
#include <string>
using namespace std;
int main(void)
{
string names[5];
string birthdays[5];
int select;
do
{
cout << "1. Enter name and birthdate" << endl;
cout << "2. View entries" << endl;
cout << "3. Terminate program." << endl;
cin >> select;
if (select == 1)
{
for (int i = 0; i < 5; i++)
{
cout << "Enter name" << endl;
cin >> names[i];
cout << "Enter birthdate" << endl;
cin >> birthdays[i];
}
}
if (select == 2)
{
for (int i = 0 ; i < 5; i++)
{
cout << "Name: " << names[i] << endl << "Birthday: " << birthdays[i] << endl;
}
}
} while (select != 3);
return 0;}
However, I am now asked to modify it as follows and I have no idea what to do:
Modify this program to store one person’s birthday information in a struct data type. The struct should consist of two other structs: one struct to hold the person’s first name and last name, and another to hold the date (day, month, and year). Consider including other information as well, such as a vector of strings with a list of possible gift ideas.