i wanted to let a user input a string which has whitespaces.but my compiler seems to only take the character and does not include the whitespace. I have entered the code below:
#include <iostream>
using namespace std;
int main ()
{
char str[100];
cout<<"Enter the value";
cin>>str;
cout<<"Value is :";cout<<str;
return 0;
}