I am trying to have a string accept a character space. However when you type something like:
Mike Smith
the output is only
Mike
Is there an easy way to fix this? Can I do something like:
string playerName (50) <-- Where (50) is the length of the string
My Code below:
int main() {
string playerName;
cout << "Enter Player Name: ";
cin >> playerName;
cout << playerName << endl;
}