I'm trying to create a program who check if a specific key in keyboard is pressed and return a boolean value into a while loop
something like this:
int main(int argc, char** argv){
std::cout << "Press the spacebar to exit loop";
while (true){
if (IsKeyPressed("space")){
break;
}
}
return 0;
}
I use Linux if this matters.