je ne comprends pas mon erreur
sniiiifff
j'ai un fichier fonctions.h :
J'ai un fichier hough.c :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 #include <cv.h> #include <highgui.h> struct HoughResult { CvPoint pt; int rayon; }; /* Hough */ HoughResult HoughCircle(IplImage *src, int Rmin, int Rmax, int pt0x, int ptfx, int pt0y, int ptfy);
j'ai un fichier main ou j'utilise la fonction HoughCircle
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 #include "fonctions.h" HoughResult HoughCircle(IplImage *src, int Rmin, int Rmax, int pt0x, int ptfx, int pt0y, int ptfy) { HoughResult *Result; ... return Result; }
et j'ai pleins d'erreur ^^
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 #include "fonctions.h" int main() { ... HoughCircle(src, 9, 12, pt0.x, ptf.x, pt0.y, ptf.y); ... return 0; }
je n'ai déclaré ma structure que dans fonction.hfonctions.h:26: error: syntax error before "HoughCircle"
fonctions.h:26: warning: data definition has no type or storage class
hough.c:3: error: syntax error before "HoughCircle"
hough.c: In function `HoughCircle':
hough.c:6: error: `HoughResult' undeclared (first use in this function)
hough.c:6: error: (Each undeclared identifier is reported only once
hough.c:6: error: for each function it appears in.)
hough.c:6: error: syntax error before "Result"
hough.c:71: error: `Result' undeclared (first use in this function)
hough.c:82: error: syntax error before "else"
hough.c: At top level:
hough.c:89: error: syntax error before "return"
Process terminated with status 1 (0 minutes, 0 seconds)
mais quand je la déclare partout ça bug aussi
je pense que c'est une erreur de débutant mais bon ^^
Partager