title: "Cannot initialize a parameter of type 'float *' with an Ivalue of type 'float'" compiler error
body: <p>I am making a game in xcode with c++, opengl and GLUT. I have a model which has its own .h and .cpp file and I have drawn it but I now want to translate it. I can't use gltranslate because I want to move only the gun, not my camera. The model file goes as follows:</p>
  
  <p><em>//M4.h</em></p>
  
  <pre><code>extern unsigned int M4NumVerts;
  extern float M4Verts [151248];
  extern float M4Normals [140064];
  extern float M4TexCoords [153680];
  </code></pre>
  
  <p><em>//M4.cpp</em></p>
  
  <pre><code>unsigned int M4NumVerts = 37812;
  
  float M4Verts [151248] = {
  // f 1/1/1 1582/2/1 4733/3/1
  -0.00205801177070031, 0.0252329378141267, -0.266482197565778,
  -0.00205347560809555, 0.015738643990207, -0.265580239652506,
  -0.00908273427886488, 0.018200092410135, -0.264843587943923,...};
  
  float M4Normals [140064] = {
  // f 1/1/1 1582/2/1 4733/3/1
  -0.1361849642872, -0.0937589754128839, -0.986236741371776,
  -0.1361849642872, -0.0937589754128839, -0.986236741371776,
  -0.1361849642872, -0.0937589754128839, -0.986236741371776,...};
  
  float M4TexCoords [153680] = {
  // f 1/1/1 1582/2/1 4733/3/1
  0.110088, 0.229552,
  0.108891, 0.243519,
  0.119508, 0.240861,..};
  </code></pre>
  
  <p>I have a function in my math class that translates the points like this:</p>
  
  <pre><code>void Math::translatePoint(float P[3], float x, float y, float z){
  P[0] += x;
  P[1] += y;
  P[2] += z;
  }
  </code></pre>
  
  <p>The function works for one point if I do the following:</p>
  
  <pre><code>  Math::translatePoint(M4Verts[x], 0, 0, -0.5);
  </code></pre>
  
  <p>I want it to work for all the points so I made this for loop:</p>
  
  <pre><code>for (int x = 0; x &lt; M4NumVerts; x++) {
      Math::translatePoint(M4Verts[x], 0, 0, -0.5);
  }
  </code></pre>
  
  <p>I do this but it wont work and I am met with the error: </p>
  
  <p><strong>Cannot initialize a parameter of type 'float *' with an Ivalue of type 'float'</strong></p>
  
  <p>I have searched around and tried to find alternatives like defining x as a float instead but nothing I try works. Can anybody help.</p>