Почему CancelIoEx не отменяет getline полностью и нужно дважды ввести, чтобы запустить следующую getline? ⇐ C++
-
Anonymous
Почему CancelIoEx не отменяет getline полностью и нужно дважды ввести, чтобы запустить следующую getline?
Here is a C++ example.
Each 7 seconds, CancelIoEx() is called and user needs to fill in the content twice (by hit Enter key twice) to trigger getline().
I guess something in Windows Console may not be canceled by CancelIoEx() properly can cause this issue?
#include #include #include #include using namespace std; HANDLE hStdin = nullptr; void readInput() { string input; while (true) { cout
Источник: https://stackoverflow.com/questions/781 ... to-trigger
Here is a C++ example.
Each 7 seconds, CancelIoEx() is called and user needs to fill in the content twice (by hit Enter key twice) to trigger getline().
I guess something in Windows Console may not be canceled by CancelIoEx() properly can cause this issue?
#include #include #include #include using namespace std; HANDLE hStdin = nullptr; void readInput() { string input; while (true) { cout
Источник: https://stackoverflow.com/questions/781 ... to-trigger
Мобильная версия