Reading in the input as a string

Last edited on
You could use getline found in <sstream>.

Use it like this

string phrase;
Last edited on
ive tried that but i just messes my program up. It skips over another point where you're supposed to enter something
It does? Might just be something in your code. Could you show it?
Highly likely you've used cin>> before it, which if you pressed enter would leave a newline character in the buffer. getline() reads that as an empty line. But to be sure, we'd need to see the code as Vermacian55 asked.
Topic archived. No new replies allowed.