the way I have it now when I press the key it keeps doing the code until I press the key again but I want it to do the code once when I press the key
void test() {
bool active = true;
int num = 0;
while (active) {
if (GetKeyState(VK_PRIOR)) {
num++;
cout << num << endl;
}
if (GetKeyState(VK_NEXT)) {
num--;
cout << num << endl;
}
}