c++ cin with spaces code example
Example 1: does cin read whitespace?
cin does not read white space.
Example 2: get spaces in cin c++
int main()
{
char a[10];
for(int i = 0; i < 10; i++)
{
cin>>a[i];
if(a[i] == ' ')
cout<<"It is a space!!!"<<endl;
}
return 0;
}