Bonjour,

dans mon programme, j'ai l'erreur suivante :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
raytrace.c: In function ‘makeCylinder’:
raytrace.c:49: erreur: syntax error before ‘)’ token
La fonction en question :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
cylinder* makeCylinder(GLfloat x, GLfloat y, GLfloat z, GLfloat r) {
  cylinder* cylinder;
  /* allocate memory */
  cylinder = (cylinder*) malloc(sizeof(cylinder));
 
  /* put stuff in it */
  cylinder->c = makePoint(x,y,z,1.0);   /* center */
  cylinder->r = r;   /* radius */
  cylinder->m = NULL;   /* material */
  return(cylinder);
}
Je ne vois pas très bien ou se situe l'erreur.
Quelqu'un pourrait-il m'indiquer ou se situe l'erreur.

Merci