Answer the question
In order to leave comments, you need to log in
Why is it better to use getline, and what is cin for?
The main difference is that getline is a function and cin is an object. But how does this affect usage?
Answer the question
In order to leave comments, you need to log in
getline to get the text written before the enter key was pressed, cin to get the text up to the first space (i.e. " "
.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question