| Dash (122) | |
The reason is that the input buffer is not flushed. Remove num++, add cin.ignore(100, '\n'); after cin >> num;.
| |
|
|
|
| Ch1156 (733) | |
| ok i kind of thought that might be the case. would cin.sync() work also? | |
|
|
|
| Ch1156 (733) | |
| That seems like a big problem with C++, i usually find myself having to flush the input buffer alot. | |
|
|
|