Reset?

Started by
2 comments, last by MetaKnight 21 years, 8 months ago
How do you reset a program in C++? Like presing a reset button on a console. Like within the program
Advertisement
Look up ExitWindowsEx at MSDN.
Depends on the type of program.

If it''s windows application you just have to make sure that you open any windows that should be open when your program starts and close one that shouldn''t be, also clear variables that shouldn''t have values in them yet, and ut default values in variables that should have them.

If it''s a game then the easiest way I know of s to use a state machine and have a state like GAME_STARTUP, that way you can return your game to that point at any time, just as long as you don''t gather resources in that state, you don''t want to allocate resources twice.

Jason Mickela
ICQ : 873518
Excuse my speling.

The V-Town Have-Nots
"The paths of glory lead but to the grave." - Thomas GrayMy Stupid BlogMy Online Photo Gallery
LOL! Looks like I completely missed the point of the question . Wot that bloke just said ^^^...

This topic is closed to new replies.

Advertisement