Is there something similar to string that can hold multiple words? for example I want to define someone's name and last name as a single character in the code.
Yeah I have trouble with... using the proper terms in english
No problem. I was able to figure out what you meant.
how should I go about asking the user to enter his full name while having to click enter only once?
cin works for this.
1 2 3 4 5 6 7 8
person_name person;
if (cin >> person.first_name >> person.last_name)
{ // Two names entered
}
else
{ // problem with cin
}
cin will separate the two names based on a space between the names. Works fine for the simple case of two names. It's a problem if the the first or last name has two parts though.