title: Compiler error: expected a "{" before "int main"
body: <p>When trying to compile my program I get the error </p>
  
  <pre><code>icpc -c main.cpp
  main.cpp(4): error: expected a "{"
  int main()
  ^
  
  main.cpp(55): error: return value type does not match the function type
  return 0;
         ^
  </code></pre>
  
  <p>It seems to not be recognizing my main function as the <em>main</em> function. Here is the main function code, Makefile, and header:</p>
  
  <p>main.cpp</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "main.h"
  
  int main()
  {
  float p,c,dt;
  float P[10001], C[10001];
  
  std::cout&lt;&lt;"For the following inputs, the equilibrium values for population and CO2 concentration are 120 and 340 respectively. \nEnter your plant population, p, in 100m^2: ";
  std::cin&gt;&gt;p;
  std::cout&lt;&lt;"Enter your initial carbon concentration, c, in ppm: ";
  std::cin&gt;&gt;c;
  std::cout&lt;&lt;"Enter your time interval in number of hours: ";
  std::cin&gt;&gt;dt;
  dt = 0.01*dt;
  
  co2(c,p,dt,P,C);
  
  int idim,jdim,i1,i2,j1,j2;
  idim=100;
  jdim=100;
  i1=0;
  i2=100;
  j1=0;
  j2=100;
  float Clo=0.0;
  float Chi=5000.0;
  
  float TR[6] = {0.5,1.,0.,0.5,0.,1.};
  
  plotimage(C,idim,jdim,i1,i2,j1,j2,Clo,Chi,TR);
  return 0;
  }
  </code></pre>
  
  <p>Header file:</p>
  
  <pre><code>float dcdt(float, float);
  float dpdt(float, float);
  void co2(float, float, float, float[], float[]);
  void plot(float[], float[], float);
  void plotimage(float [],int, int, int, int, int, int, float, float, float [])
  </code></pre>
  
  <p>Makefile:</p>
  
  <pre><code>main: main.o dcdt.o dpdt.o co2.o plot.o plotmap.o
      icpc -o main main.o dcdt.o dpdt.o co2.o plot.o plotmap.o -ltrapfpe -lpgplot -lcpgplot -lX11 
  
  main.o: main.cpp main.h
      icpc -c main.cpp
  
  dcdt.o: dcdt.cpp main.h
      icpc -c dcdt.cpp
  
  dpdt.o: dpdt.cpp main.h
      icpc -c dpdt.cpp
  
  co2.o: co2.cpp main.h
      icpc -c co2.cpp
  
  plot.o: plot.cpp main.h
      icpc -c plot.cpp
  
  plotmap.o: plotmap.cpp main.h
      icpc -c plotmap.cpp
  </code></pre>