![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Newbie
Join Date: Nov 2004
Posts: 14
Rep Power: 0
![]() |
I had the same problem when I first started using C++. Try running w/o debugging. That fixed the problem for me.
__________________
It's too bad that stupidity isn't painful |
|
|
|
|
|
#12 |
|
Professional Programmer
Join Date: Feb 2005
Posts: 434
Rep Power: 4
![]() |
When your program uses cin for an input you usually have the enter floating about and need to purge it, or cin.get() picks it up and doesn't wait.
Use this to make your console display wait for a key: cin.sync(); // purge enter cin.get(); // console wait return 0; You can also use two cin.get() statements in the row. getchar() gets bothered by the same thing and is a holdover from the C parenthood of C++. You need to include the cstdio header though. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|