I'm hoping this is the correct place to ask this. If its not I'm really sorry and I ask any moderators to move it to the correct place.
I'm working on a game Project for a class. I could play the worlds smallest violin but, to be honest, I'm dumb and deleted my entire project (Which was complete) and I had to reconstruct it from scratch... which I have done but now I'm not getting something to work like it has in the past.
My professor requires us to check if space key it being pressed and if it is continue (instead of dbWaitKey)... otherwise pause the game. This sounds simple like creating a function with a while loop that if dbSpaceKey == 0, repeats blank.... this is how I THOUGHT I originally had it but thats not working. I'm sure I'm just duressed and missing something completely obvious... so if someone could humor me and look at my code and tell me what I'm doing wrong I would be ever grateful and my brain would thank you forever...
void spaceKeyCheck()
{
while (dbSpaceKey == 0)
{
}
}
-----------------------------------------------------------
Just call it wherever I need the check with spaceKeyCheck() when I need a pause....