where i place that function?

Guys i got a program i made buts its too long so im sending u the url to it :D
i need to place in a quit function help me plz ( tryed alot before)


The url is :
http://pastebin.com/m360474ad

its just a site that shows u my code no need to download anything :)
*Jaw drops*
What in the name of God have you done? Ugh... My brain!

Anyway, I think void exit(int) is what you're looking for.
Its in french :)! lol .... anyways where? :S... i tryed making an exit function didnt work pale! i need a place to put it in :P!
in int main :D lol
No, I meant all those ifs. Just awful.

What you needed was a function that would terminate the program no matter how deep in the call stack it was, right? Just make a call to exit() where you need to terminate.
lol not really i just need a function that works if i press a button :D... ex:
i pressed ESC anytime in the program it should close
it doesnt work i tryed many functions
OOOOhhhhh........

Well, that's something completely different. You never mentioned that, before.

There's nothing in the standard library that will allow you to do that. To do it, you'll need threads and some system-dependent function that will tell you which key's are being pressed. I think the function in Windows was GetAsyncKeyState().
Topic archived. No new replies allowed.