title: How to split code into multiple files
body: <p>I want to split my code into multiple files. At this moment I have somethink like this but every time I need to include libraries and headers into each of these file.<br>
  Is it better way to do this? 
  <strong>main.cpp</strong>  </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;stdio.h&gt;
  #include &lt;cstdlib&gt;
  #include &lt;conio.h&gt;
  #include &lt;string.h&gt;
  #include &lt;windows.h&gt;
  #include "modules/intro.cpp"
  #include "modules/login.cpp"
  
  using namespace std;
  
  int main() {
      introModule();
      login();
  
      system("pause");
  }
  </code></pre>
  
  <p><strong>intro.cpp</strong>  </p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
      void introModule() {
          // content of intro file
      }
  </code></pre>
  
  <p><strong>login.cpp</strong>  </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;conio.h&gt;
  #include &lt;string.h&gt;
  #include &lt;windows.h&gt;
  #include "menu.cpp"
  
  using namespace std;
  
  
  #define ENTER           13
  #define BACKSPACE        8
  
  
  char passInputCharacter;
  char password[20];
  const char *accessPassword = "123";
  
  int passInputCharacterPosition = 0;
  
  HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
  
  void login() {
      // content of login file
  }
  </code></pre>