+ 19
Why use cin.get while cin>> seems fine
am still a begginer...dont get all geeky🙄🙄
2 ответов
+ 13
cin.get extracts characters from the input stream and store them as a c-string.
http://www.cplusplus.com/reference/istream/istream/get/
+ 5
cin.get() is a built-in method with three overloads, purposely for character inputs. it reads every character you enter including space and newline.
the stream extraction operator >> is overloaded for any type, and can also be overloaded for user-defined types. it terminates on reaching a space or newline on input.