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

16th Sep 2017, 5:24 AM
komal shehzadi
komal shehzadi - avatar
1 ответ
+ 12
Use getline(cin, myVar); instead of cin >> myVar; for strings if you want to include the whitespaces.
16th Sep 2017, 5:28 AM
Hatsy Rei
Hatsy Rei - avatar