+ 1
why does cin.get() not ask for my input?
3 Réponses
+ 4
Because it doesn't work like that...
As for cout, you need the double 'lower-than' sign operator to Console OUTput, for cin you need the double 'greater-than' sign operator to get a Console INput:
cin >> my_var;
[ EDIT ]
Correction: triple to double, and >>> to >>
+ 2
use cin.getline() instead of cin.get()
0
Thanks for the answers, i was reading a book and it used cin.get() for getting input, i may have been wrong or something. thanks :)