Hey. My project requires me to display the image based on an option of yes or no, and then wait for a few seconds and exit.
I have an if loop like this:
else if (...)
else cout << "Please click on Yes or No"<< endl;
Now I need to add a delay and close the new window with the image and the original window. I don't have problem with the original window but how do I close the new image window without making the user clicking on the close button?
I'm also using SDL, and I tried SDL_Delay(1000) and SDL_Quit(), but this adds a delay after I manually close the image, and then the original window closes.
Can anyone help me with this please?