typedef struct strVertice { Point pos; /* vertice position relative to top left of tilemap */ Edge* edges[4]; }Vertice;
int verticeAdd(int a, int b);
#endif
Jeg har kun inkluderet h filerne da c filerne kun implementerer en "dummy" funktion.
Begge inkluderes i main.c
Output fra make all er følgende:
#make gcc -g main.c edge.o vertice.o In file included from vertice.h:4, from main.c:4: edge.h:10: parse error before `Vertice' edge.h:10: warning: no semicolon at end of struct or union edge.h:11: warning: data definition has no type or storage class edge.h:13: parse error before `}' edge.h:13: warning: data definition has no type or storage class In file included from main.c:4: vertice.h:6: warning: useless keyword or type name in empty declaration vertice.h:17: parse error before `Edge' vertice.h:17: warning: no semicolon at end of struct or union vertice.h:18: warning: data definition has no type or storage class gmake: *** [myprogram] Error 1
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.