I suppose that cin operator >> extract only until any whitespace. The solution would be to repeat reading from cin until you get a '\n', and concatenate everything you've read into a string.
I never particularly liked streams, so I've never actually learnt much about them.
Seems there's a std::getline() just for this purpose:
http://www.cplusplus.com/reference/string/getline/
I never particularly liked streams, so I've never actually learnt much about them.
Seems there's a std::getline() just for this purpose:
http://www.cplusplus.com/reference/string/getline/