Bonjour,
dans mon programme, j'ai l'erreur suivante :
La fonction en question :
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
Je ne vois pas très bien ou se situe l'erreur.
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); }
Quelqu'un pourrait-il m'indiquer ou se situe l'erreur.
Merci
Partager