title: Compile-time error: Multiple definition of 'main'
body: <p>I am getting the following error: Multiple definition of `main'</p>
  
  <p>I have created a new project, there are two c++ files in it:</p>
  
  <p>File 1</p>
  
  <pre><code>#include &lt;iostream&gt;
  
   using namespace std;
  
  int main()
  {
      cout&lt;&lt;"Hello World";
      //fflush(stdin);
      //getchar();
      return 0;
  }
  </code></pre>
  
  <p>File 2</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main()
  {
      cout&lt;&lt;"Demo Program";
      return 0;
  }
  </code></pre>
  
  <p>When I press Build project and Run, I get error. How do I run these files?</p>