title: Creating main menu for DOS program
body: <p>I'm writing a short text-adventure game and that game is ready, but now I want to do something with a main menu. Note that the whole game is in DOS.</p>
  
  <p>This is what I want to achieve:</p>
  
  <p>Create a main menu in the following way, but using while and switch loops. The switch loop will contain cases (case 1:, case 2:, case 3:, etc.) with the following options (which will cout above the loops)</p>
  
  <pre><code>cout &lt;&lt; "[1] Play\n";
  cout &lt;&lt; "[2] Credits\n";
  cout &lt;&lt; "[3] Exit\n";
  </code></pre>
  
  <p>Now, the text-adventure game is too big to just put in this loop as it becomes increasingly hard to read because of nesting. There are loops in the game itself too, also while and switch loops. What I want to do now is something like the following, but I don't know how to do this. I will write it in psuedocode:</p>
  
  <pre><code>*open file game_name.cpp*
  If player presses 1
      Insert actual_game.cpp
      Play game until over or user presses escape
  else if player presses 2
      Show credits
      Return to main menu
  else if player presses 3
      Terminate the session
  else
      Shows the player that an invalid option has been chosen
  </code></pre>
  
  <p>The point is that I want to include multiple .cpp files instead of putting all the code in one single file (the actual_game.cpp). What is the best way to do this?</p>