0
How do accept string input with spaces in c++?
I m trying to take string input with spaces but its not getting with cin as it discards the second starring after space. kindly help me in this situation.
7 Answers
0
For starting - You can use char arrays to store string.
0
but it doesn't accept next strings input.
0
Santosh Nagargoje What do you mean it doesn't take input?
0
when I press enter button after first string input. it doesn't take input for second string.
0
You have to enter all the inputs at once. Write all the Inputs in different lines.
Ex-
Input 1
Input 2
Input 3
.
.and so on.
0
ok thanks