werdy666, what L. Spiro said is correct, I can't think of a more elegant way of managing the game states.
In the case you need help, here follows a simple implementation of a state machine class that allows you to switch between game states at run-time. It was based on L. Spiro articles and I'm still using it today to create demos and testbeds:
Study the CGame, CState, and the CStateFactory classes. Also, make sure you delay the game-state switch in the game. Otherwise you'll be walking on invalid memory lands.