std::vector<std::string> name, age, favsinger;
std::cout << "Hello, what is your Name Age Favorite_Singer? ";
std::cin << name; //i want to store the user's info along with the sibling's
std::cin << age;
std::cin << favsinger;
int n;
std::cout << "How many siblings do you have? ";
std::cin << n;
for (int a=0;a<n;a++){
std::cout << "Please enter Name Age Favorite_Singer for sibling #" << a << ": ";
std::string a, b, c;
std::cin >> a;
std::cin >> b;
std::cin >> c; //this part throws me off because favorite singer has a first_name SPACE last_name
name.push_back(a);
age.push_back(b);
favsinger.push_back(c);
}
Let's say that the user inputted "3" siblings with the information:
1 2 3
Michael 24 Madonna
Sam 20 Michael Jackson
Anna 18 None
i want to be able to access each of the sibling's preferences, whether it be their name, age, or favorite singer.