multiple inputs c++

I am new to C++ and am trying to create a program that asks the user personal questions.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
    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.

I tried doing

 
age[1]


but if i do

 
favsinger[1]


it gets thrown off because of the space.
Why did you ask this question twice?
http://www.cplusplus.com/forum/general/121932/
sorry I meant to post it in the Beginners section but i'm not sure how to delete the other question :/
I think if you edit the other question, you can move the topic into a different section.
What do you actually meant by? Seems you did not copy the code properly, making the important parts missing.
And what was that code at Line 1?
Topic archived. No new replies allowed.