title: correct error code to trace a sphere
body: <p>I have this little code </p>
  
  <pre><code>GLUquadricObj *q = gluNewQuadric()
  ....
  .....
  glTranslatef(s-&gt;c.x, s-&gt;c.y, s-&gt;c.z);
  gluSphere(q, s-&gt;r, SPHERE_DIVS, SPHERE_DIVS);
  </code></pre>
  
  <p>and I want to replace this glusphere with a function which I made. It takes as parameters a 3D center, a radium and it traces a sphere </p>
  
  <pre><code>int gp21_gluSphere(GLfloat x, GLfloat y, GLfloat z, GLdouble radius);
  </code></pre>
  
  <p>but my problem is that when I replace the function</p>
  
  <pre><code>gluSphere(q, s-&gt;r, SPHERE_DIVS, SPHERE_DIVS);
  </code></pre>
  
  <p>with </p>
  
  <pre><code>gp21_gluSphere (q.x, q.y, q.z, s-&gt;r);
  </code></pre>
  
  <p>I get these errors </p>
  
  <pre><code>error C2228: left of '.x' must have class/struct/union type
  error C2228: left of '.y' must have class/struct/union type
  error C2228: left of '.z' must have class/struct/union type
  </code></pre>
  
  <p>What should I do? </p>