I am currently doing a school project. we are allowed to anything as long as it meets the requirements. i have it finished but i want to add something so wherever you are in the code you can press escape and open up a menu that allows you to exit the section of code you are in. is there anyway to do this without pausing the program and asking the user?
You need to run two threads; one main thread and one thread waiting for you to press escape. You've got to use some operating system API/user-written library for the 'waiting to press escape' part, because you can't do this with just the standard library.
Anyways if it's a console program and you don't know about threading yet, then I say don't bother and look for other places where you can improve.
edit: Didn't realize I was in Windows Programming.