Goto/Start to another file?

Heya there!, Ive just started reading and learning about C++ and I tried to make an easy 2D game from the small knowledge I have.

In my small game, I have a menu called "menu.cpp" which you can choose stuff like "Singleplayer" etc.

And I have a file called "singleplayer.cpp" since I dont want to have everything in one big messy file.

So my question is, how do you in some way "goto" from the "menu.cpp" file to the "singleplayer.cpp" file?, So I run the menu, then choose singleplayer and then it jumps into "singleplayer.cpp" and starts that.

I hope you understood what I meant and I would really appriciate a answer :)
And now for the pessimist's opinion:
http://www.cplusplus.com/forum/articles/17776/
I honestly would like to see you succeed but game programming is always harder than it looks.
EDIT: The pessimist being me.
Last edited on
Topic archived. No new replies allowed.