cin with spaces?
May 26, 2012 at 10:41am
1 2 3 4 5 6 7 8 9 10 11 12
|
#include <iostream>
#include <string.h>
using namespace std;
int main()
{
cout<<"write:"
string s;
cin>>s;
cout << s << endl;
return 0;
}
|
and when I writeout:
it prints out only frewiuof.
I also tried to close the sentence with quotes (") but it didn't work.
May 26, 2012 at 10:45am
May 26, 2012 at 10:57am
It worked!
Thanks.
Topic archived. No new replies allowed.