title: Error: declaration of C function conflicts with previous declaration
body: <p>I'm a bit of a beginner and I'm starting to get the hang of things but I'm adding another part to this calculator for this guy. </p>
  
  <p>I have this as the <code>main.cpp</code>, I have added the bit for <code>selection == 5</code>:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string.h&gt;
  
  using namespace std;
  
  // Function includes
  // I try to keep them in the order they appear in the
  // output below for organization purposes
  #include "calc.m.xy12plugin.cpp"
  #include "calc.b.xymplugin.cpp"
  #include "calc.m.xybplugin.cpp"
  #include "calc.point.xymplugin.cpp"
  #include "calc.parallelplugin.cpp"
  
  // The above one would be here, too
  
  int main(int argc, const char* argv[]) {
  int i;
  i = 0;
  cout &lt;&lt; "Linear Equation Calculator" &lt;&lt; endl &lt;&lt; "Copyright (c) 2011 Patrick Devaney" &lt;&lt; endl
  &lt;&lt; "Licensed under the Apache License Version 2" &lt;&lt; endl;
  // This loop makes the code a bit messy,
  // but it's worth it so the program doesn't
  // crash if one enters random crap such as
  // "zrgxvd" or "54336564358"
  while(i &lt; 1) {
  cout &lt;&lt; "Type:" &lt;&lt; endl
  &lt;&lt; "0 to calculate a slope (the M value) based on two points on a line" &lt;&lt; endl
  &lt;&lt; "1 to calculate the Y-intercept (the B value) based on two points and a slope" &lt;&lt; endl
  &lt;&lt; "2 to calculate the slope (the M value) based on the Y-intercept and X and Y" &lt;&lt; endl &lt;&lt;
  "plug-ins" &lt;&lt; endl
  &lt;&lt; "3 to find the next point up or down a line based on the slope (M) and X and Y"
  &lt;&lt; endl &lt;&lt; "plug-ins" &lt;&lt; endl
  &lt;&lt; "4 to find a point x positions down the line based on the slope (M) and X and Y"
  &lt;&lt; endl &lt;&lt; "plug-ins" &lt;&lt; endl
  &lt;&lt; "5 to find the equation of a parallel line in form y=mx+c"
  &lt;&lt; endl &lt;&lt; "plug-ins" &lt;&lt; endl;
  
  string selection;
  cin &gt;&gt; selection;
  if(selection == "0") {
  mcalcxyplugin();
  i++;
  }
  else if(selection == "1") {
  calcbxymplugin();
  i++;
  }
  else if(selection == "2") {
  calcmxybplugin();
  i++;
  }
  else if(selection == "3") {
  calcpointxymplugin(1);
  i++;
  }
  else if(selection == "4") {
  int a;
  cout &lt;&lt; "How many points up/down the line do you want? (Positive number for points" &lt;&lt; endl
  &lt;&lt; "further up, negative for previous points" &lt;&lt; endl;
  cin &gt;&gt; a;
  calcpointxymplugin(a);
  i++;
  }
  else if(selection == "5"){
  calcparallelplugin();
  i++;
  }
  else {
  i = 0;
  }
  // End of that loop below
  }
  return 0;
  }
  </code></pre>
  
  <p>I then created this file that i linked in to the <code>else if(selection == "5"...</code></p>
  
  <p>This is the <code>cal.parallelplugin.cpp</code> file</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  
  int main(){
  cout &lt;&lt;"Welcome to the Parallel Line Calculator \n" &lt;&lt; endl;
  cout &lt;&lt; "Here you will find the equation of the line parallel to a line passing through \na point (x,y) in the form y=mx+c \n\n" &lt;&lt; endl;
  
  float x,y, c, x1, y1, gradient, c1;
  
   cout &lt;&lt; "NOTE: Equation must be in form y=mx+c \n" &lt;&lt; endl;
   cout &lt;&lt;"Please enter the number of Xs:" &lt;&lt;endl;
   cin &gt;&gt; x;
   cout &lt;&lt;"Please enter the number of Ys:" &lt;&lt;endl;
   cin &gt;&gt; y;
   cout &lt;&lt;"Please enter the number of Cs:" &lt;&lt;endl;
   cin &gt;&gt; c;
   cout &lt;&lt;"Please enter the x co-ordinate:" &lt;&lt;endl;
   cin &gt;&gt; x1;
   cout &lt;&lt;"Please enter the y co-ordinate:" &lt;&lt;endl;
   cin &gt;&gt; y1;
  
  gradient= x/y;
  c1 = y1 + (gradient*x1);
  
   cout &lt;&lt; "Equation of parallel line through (" &lt;&lt; x1 &lt;&lt; ", " &lt;&lt; y1 &lt;&lt; ") is " &lt;&lt; "y=" &lt;&lt; gradient &lt;&lt; "x+" &lt;&lt; c1 &lt;&lt; endl;
  
  }
  </code></pre>
  
  <p>I don't get errors when compiling this but when I compile the main.cpp I get the following errors and I can't spend my all life working out what is wrong :( </p>
  
  <pre><code>C:\Users\George\Desktop\linear_equation_calc\main.cpp||In function 'int main(int, const char**)':|
  C:\Users\George\Desktop\linear_equation_calc\main.cpp|51|error: declaration of C function 'int main(int, const char**)' conflicts with|
  C:\Users\George\Desktop\linear_equation_calc\calc.parallelplugin.cpp|9|error: previous declaration 'int main()' here|
  C:\Users\George\Desktop\linear_equation_calc\main.cpp||In function 'int main(int, const char**)':|
  C:\Users\George\Desktop\linear_equation_calc\main.cpp|100|error: 'calcparallelplugin' was not declared in this scope|
  ||=== Build finished: 3 errors, 0 warnings ===|
  </code></pre>
  
  <p>HELP!</p>