Im trynna make my own AutoClicker, and it has keyboard events. But when calling Cin after pressing the keys that activate the other functions of the program (Numpad 0 2 3) and having to use cin it automatically has 0 2 3 in it, i tried with cin.clear and it didn't make any difference. the part of the code that has problems
if (GetKeyState(0x61) & 0x80) {
kbe.getKey(0x61);
std::cout << "Set Delay: ";
std::cin >> ms;
Other function that has no problem but still stores the key pressed in the previous function
if (GetKeyState(0x60) & 0x80) {
kbe.getKey(0x60);
GetCursorPos(&pt);
x = pt.x;
y = pt.y;
std::cout << "x = " << x << " y = " << y;
std::cout << "\|CursorPos Saved" << std::endl;
}