0
i am getting first string value before space not full name ?
when i assign a string value and take full name of user it prints only first name the second name after space skips automatically
1 Answer
+ 12
Use
getline(cin, myVar);
instead of
cin >> myVar;
for strings if you want to include the whitespaces.