cin with spaces?

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:
 
write:frewiuof frejio

it prints out only frewiuof.
I also tried to close the sentence with quotes (") but it didn't work.
It worked!
Thanks.
Topic archived. No new replies allowed.