Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New to C++. n00b question.
#1
I need someone to explain the difference between inputting with getline and why you would use it and just using cin.

[Image: Tracesign399523.jpg]
TROLOLO
Reply
#2
When you use getline you are doing what it says exactly. You will get all the data in the line. If you just use cin then you will only get the characters until the first space after the first character which isn't a space. I hope that is clear.
Reply
#3
So basically getline is useful if you're using sentences for a password in your case.. Otherwise if its just one word use cin..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)