New course! Every coder should learn Generative AI!
Try a free lesson+ 2
Why do we use getline, can't we just cin for that?
What is main difference in them and what are advantages of using getline function.
1 Answer
+ 3
Cin gets only first word of input while getline function gets the whole line Including spaces and other characters.