Hello!
My question is how to make program can't be exited. I want to make program who can close only with typing correct word. I work in Code Blocks. Anyone know?
That's an OS-dependent thing to do. On Windows, you need to process the WM_CLOSE message (sent to your application's window) or the WM_QUIT message (sent to the application's message loop).
I don't recall the X events off the top of my head.
A lot of GUI frameworks abstract this for you.
For a console application, you cannot stop the user from closing the window. (And the message to hook a console window close does not work on certain versions of windows -- as a known bug.)
If you could provide more information, we might be able to give a more specific answer.