Code:
string str;
getline(str, cin);
...IIRC.