cin

Apr 5, 2019 at 8:44pm
closed account (N8MNAqkS)
std::cin >> allows me to get user input for numbers, and then you press enter.

is there an equivalent to this for text
Apr 5, 2019 at 8:49pm
If you want to include spaces in your block of text, you can use std::string's std::getline().

http://www.cplusplus.com/reference/string/string/getline/

Mixing std::cin and std::getline() in retrieving input can cause problems if you don't reset the input stream.
Topic archived. No new replies allowed.