Need assistance modifying c++ program for class, like really bad.

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.

Any help would be greatly appreciated!
Thank you!
so how do you think you would go about doing this? we cant simply write it for you, we first need to see you attempt to write/modify the assignment.
int main(void)the void is useless and is non-standard for c++, it is only needed for c.
mtsac wrote:
struct data type.

declare structs as such...
1
2
3
4
5
struct me{
string name; 
int height, length, width, age;
char gender; 
};
Topic archived. No new replies allowed.