cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
function prob
function prob
Aug 26, 2008 at 1:50am UTC
sarahjt1017
(13)
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. ????
Aug 26, 2008 at 1:54am UTC
Zaita
(2770)
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.