What is the actual difference in using
and usingCode:getchar();
Code:cin.get();
Printable View
What is the actual difference in using
and usingCode:getchar();
Code:cin.get();
One utilizes the cin istream object and one doesn't.
so wich is better or is some better in some codes and the other in other codes?
If you're only including <iostream> then cin.get() is better. If you're only including <cstdio> then getchar() is better.
In C++ you're most likely gonna be using cin.get().
okay thanks....