function prob

I am having trouble figure out exactly what i need to write a function that allows the user to input a message, separating each line with the enter key. They the function counts how many lines were entered. ????

I would use getLine(cin); and then put each line into a vector<string> and then use vector.size();.

That should easily allow you to get many lines, then count how many lines were entered and what was in them.
Topic archived. No new replies allowed.