cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Why cin.get(); and cin.ignore(); are not
Why cin.get(); and cin.ignore(); are not pausing in some programs
Jul 10, 2012 at 1:29am UTC
b1gzz
(20)
Why
cin.get();
and
cin.ignore();
are not pausing some of my programs?
Jul 10, 2012 at 3:21am UTC
shacktar
(1187)
Probably because there are residual characters left in the input stream after input (likely newlines). For the cin.get() and cin.ignore() that are not pausing your programs, try calling
cin.sync();
immediately before,
Topic archived. No new replies allowed.