How i can get space in string?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How i can get space in string??

e.g string a; cin>>a; when i press space cin process terminates any one can help

13th May 2017, 12:04 PM
Hasnain Ali
3 Answers
+ 8
getline(cin, a);
13th May 2017, 12:06 PM
jay
jay - avatar
+ 1
thank you Jay❤
13th May 2017, 12:14 PM
Hasnain Ali
0
U shall use a cin.getline() function. I think the Intellisense will tell u the parameter list when using cin.getline().
18th May 2017, 1:07 AM
PySolo