String with space bar | Sololearn: Learn to code for FREE!

+3

String with space bar

If I enter blank at the input then the string is invalid. https://code.sololearn.com/c9JkXUv68Fs6/#cpp

5/19/2018 12:48:38 PM

Michelle Becker

2 Answers

New Answer

+3

use getline() instead of cin

+2

you can use getline function getline(cin,var);