+ 2
How can be string with spaces can be entered???
cin.getline doesnt seem to work after an interger number is taken
4 Respuestas
+ 1
You can also take the entire input as string, and then use the split function to separate on spaces
+ 1
and what if i want to use only cin.getline functn.. n accept an itnteger number before entering a string
+ 1
Sorry, I did not understand what you want to do... Please explain in more details, I'll try and see if I can help
0
string str = "";
getline(cin, str);