title: C++ issue : conflicting declaration
body: <p>I have an issue on a C++ project with OpenGL : 
  In my file 'cube.cpp' I have this : </p>
  
  <pre><code>    point3 r1 = point3(40.0,0.0,-450.0);
      point3 r2 = point3(55.0,0.0,-450.0);
      point3 r3 = point3(55.0,0.5,-450.0);
      point3 r4 = point3(40.0,0.5,-450.0);
  
      point3 r[4];
      r[0] = r1;
      r[1] = r2;
      r[2] = r3;
      r[3] = r4;      
      rails(r);
  </code></pre>
  
  <p>Point3 is an object which representing a vertex.
  Rails is an object which draw 3D rails.
  The issue is when I want to compile my project, I have this : </p>
  
  <pre><code>g++ Struct.cpp skybox.cpp rails.cpp cube.cpp -o train
  cube.cpp: 
  In function ‘void display()’:
  cube.cpp:296:11: error: conflicting declaration ‘rails r’
      rails(r);
             ^
  cube.cpp:291:11: error: ‘r’ has a previous declaration as ‘point3 r [4]’
      point3 r[4];
             ^
  </code></pre>
  
  <p>I asked to my friends but we don't find why it doesn't want to compile rails(r), previously I had create a class Skybox and this class with the same type in argument works correctly.</p>
  
  <p>If anyone have an idea...</p>
  
  <p>Edit : 
  rails.h </p>
  
  <pre><code>#ifndef RAILS_H_
  #define RAILS_H_
  
  #include "Struct.h"
  
  using namespace std;
  
  class rails{
  
  public:
  
      rails(point3[]);
  
  };
  #endif /* RAILS_H_ */
  </code></pre>
  
  <p>And rails.cpp</p>
  
  <pre><code>#include "rails.h"
  
  #ifdef __APPLE__
  //compilation sous MacOs par :
  //gcc -framework GLUT -framework OpenGL -framework Cocoa source.c -o nom_executable
      #include &lt;OpenGL/gl.h&gt;
      #include &lt;OpenGL/glu.h&gt;
      #include &lt;GLUT/glut.h&gt;
  #endif
  
  #ifdef __WIN32__
  //parce qu'il manque des choses aux gens qui utilisent MsWindows, où OpenGL ne peut fonctionner que s'il discute avec le gestionnaire de fenêtres ("windows.h")
      #define GLUT_DISABLE_ATEXIT_HACK    //utile si vous compilez en g++ sous windows avec le glut.lib prévu pour MsVisual
      #include &lt;windows.h&gt;
      #include "glut.h"   //il faut avoir le fichier "glut.h" dans le même répertoire que votre .cpp (et aussi le glut.lib et le glut.dll)
  #endif
  
  #ifdef __linux__
      //pour les non-windowiens, GLUT (fenêtrage opengl) est inclu dans les distributions
      //pour les ubuntiens : apt-get install freeglut3 freeglut3-dev
      #include &lt;GL/glut.h&gt;
      #include &lt;GL/glu.h&gt;
  #endif
  
  rails::rails(point3 rd[]){
      float dis = 0.0;
      while(dis &lt; 900){
              glBegin(GL_QUADS);
                  glColor3ub(90,0,0);
                  glVertex3d(rd[0].x,rd[0].y,rd[0].z+dis);
                  glVertex3d(rd[1].x,rd[1].y,rd[1].z+dis);
                  glVertex3d(rd[2].x,rd[2].y,rd[2].z+dis);
                  glVertex3d(rd[3].x,rd[3].y,rd[3].z+dis);
              glEnd();
              glBegin(GL_QUADS);
                  glColor3ub(90,0,0);
                  glVertex3d(rd[0].x,rd[0].y,rd[0].z+2.0+dis);
                  glVertex3d(rd[1].x,rd[1].y,rd[1].z+2.0+dis);
                  glVertex3d(rd[2].x,rd[2].y,rd[2].z+2.0+dis);
                  glVertex3d(rd[3].x,rd[3].y,rd[3].z+2.0+dis);
              glEnd();
              glBegin(GL_QUADS);
                  glColor3ub(90,0,0);
                  glVertex3d(rd[3].x,rd[3].y,rd[3].z+dis);
                  glVertex3d(rd[2].x,rd[2].y,rd[2].z+dis);
                  glVertex3d(rd[2].x,rd[2].y,rd[2].z+2.0+dis);
                  glVertex3d(rd[3].x,rd[3].y,rd[3].z+2.0+dis);
              glEnd();
              glBegin(GL_QUADS);
                  glColor3ub(90,0,0);
                  glVertex3d(rd[0].x,rd[0].y,rd[0].z+dis);
                  glVertex3d(rd[3].x,rd[3].y,rd[3].z+dis);
                  glVertex3d(rd[3].x,rd[3].y,rd[3].z+2.0+dis);
                  glVertex3d(rd[0].x,rd[0].y,rd[0].z+2.0+dis);
              glEnd();
              glBegin(GL_QUADS);
                  glColor3ub(90,0,0);
                  glVertex3d(rd[1].x,rd[1].y,rd[1].z+dis);
                  glVertex3d(rd[2].x,rd[2].y,rd[2].z+dis);
                  glVertex3d(rd[2].x,rd[2].y,rd[2].z+2.0+dis);
                  glVertex3d(rd[1].x,rd[1].y,rd[1].z+2.0+dis);
              glEnd();
              dis=dis+5.0;
          }
              glBegin(GL_QUADS);
                  glColor3ub(90,90,90);
                  glVertex3d(54.0,0.0,-450.0);
                  glVertex3d(53.5,0.0,-450.0);
                  glVertex3d(53.5,1.0,-450.0);
                  glVertex3d(54.0,1.0,-450.0);
              glEnd();
              glBegin(GL_QUADS);
                  glColor3ub(90,90,90);
                  glVertex3d(54.0,0.0,450.0);
                  glVertex3d(53.5,0.0,450.0);
                  glVertex3d(53.5,1.0,450.0);
                  glVertex3d(54.0,1.0,450.0);
              glEnd();
              glBegin(GL_QUADS);
                  glColor3ub(90,90,90);
                  glVertex3d(54.0,1.0,-450.0);
                  glVertex3d(53.5,1.0,-450.0);
                  glVertex3d(53.5,1.0,450.0);
                  glVertex3d(54.0,1.0,450.0);
              glEnd();
              glBegin(GL_QUADS);
                  glColor3ub(90,90,90);
                  glVertex3d(54.0,0.0,-450.0);
                  glVertex3d(54.0,1.0,-450.0);
                  glVertex3d(54.0,1.0,450.0);
                  glVertex3d(54.0,0.0,450.0);
              glEnd();
              glBegin(GL_QUADS);
                  glColor3ub(90,90,90);
                  glVertex3d(53.5,0.0,-450.0);
                  glVertex3d(53.5,1.0,-450.0);
                  glVertex3d(53.5,1.0,450.0);
                  glVertex3d(53.5,0.0,450.0);
              glEnd();
  
              glBegin(GL_QUADS);
                  glColor3ub(90,90,90);
                  glVertex3d(41.0,0.0,-450.0);
                  glVertex3d(41.5,0.0,-450.0);
                  glVertex3d(41.5,1.0,-450.0);
                  glVertex3d(41.0,1.0,-450.0);
              glEnd();
              glBegin(GL_QUADS);
                  glColor3ub(90,90,90);
                  glVertex3d(41.0,0.0,450.0);
                  glVertex3d(41.5,0.0,450.0);
                  glVertex3d(41.5,1.0,450.0);
                  glVertex3d(41.0,1.0,450.0);
              glEnd();
              glBegin(GL_QUADS);
                  glColor3ub(90,90,90);
                  glVertex3d(41.0,1.0,-450.0);
                  glVertex3d(41.5,1.0,-450.0);
                  glVertex3d(41.5,1.0,450.0);
                  glVertex3d(41.0,1.0,450.0);
              glEnd();
              glBegin(GL_QUADS);
                  glColor3ub(90,90,90);
                  glVertex3d(41.0,0.0,-450.0);
                  glVertex3d(41.0,1.0,-450.0);
                  glVertex3d(41.0,1.0,450.0);
                  glVertex3d(41.0,0.0,450.0);
              glEnd();
              glBegin(GL_QUADS);
                  glColor3ub(90,90,90);
                  glVertex3d(41.5,0.0,-450.0);
                  glVertex3d(41.5,1.0,-450.0);
                  glVertex3d(41.5,1.0,450.0);
                  glVertex3d(41.5,0.0,450.0);
              glEnd();
  }
  </code></pre>