End "cin" with a dot

Feb 28, 2016 at 8:26pm
Hi, I want to be able to read with "cin" or anythin else a sentence which stopps reading when a dot(end of the sentence) appears.

Is there any suggestions?

cheers!
Feb 28, 2016 at 8:30pm
std::getline (std::cin, some_string, '.');
http://www.cplusplus.com/reference/string/string/getline/
Topic archived. No new replies allowed.