Support Forums
New to C++. n00b question. - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: Programming with C++ (https://www.supportforums.net/forumdisplay.php?fid=20)
+---- Thread: New to C++. n00b question. (/showthread.php?tid=26861)



New to C++. n00b question. - n00bikscube - 08-03-2012

I need someone to explain the difference between inputting with getline and why you would use it and just using cin.




RE: New to C++. n00b question. - FireMonkeyFun - 12-09-2012

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.


RE: New to C++. n00b question. - Simba3696 - 01-02-2013

So basically getline is useful if you're using sentences for a password in your case.. Otherwise if its just one word use cin..