Reputation: 403
How to take string input in C++?
I generally use gets. But is doesn't work for 2-D arrays. On the other hand cin ignores the text after a blank. I want the input to be the exact unformatted text.
Upvotes: 1
Views: 392
Reputation: 172378
You can use it like this:-
char input[100];
cin.getline(input,100);
Check out the cin.getline()
Upvotes: 1