Bonjour, je définis un type comme suit :
fichier main.h :
et j'obtiens l'erreur suivante :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 #include <pthread.h> /* pthread functions and data structures */ #include "vector.h" #include "nvector_serial.h" #include "engine.h" #include "mechanism.h" #include "task.h" typedef void (*pfunOutputs)(double,N_Vector *,unsigned int,Engine *,Mechanism *, char *NameFileOutput[],Vector *,pthread_t *,WriteHardDisk *);
Dans mon main j'ai les choses suivantes :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 ../Headers/Myheaders/main.h:34: error: erreur de syntaxe before "WriteHardDisk" ../Headers/Myheaders/main.h:34: attention : function declaration isn't a prototype
D'où pourait provenir cette erreur ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 pthread_t * task=malloc(N*sizeof(*task)); if(task==NULL) { MEMERROR; exit(EXIT_FAILURE); } WriteHardDisk * whd=malloc(N*sizeof(*whd)); if(whd==NULL) { MEMERROR; exit(EXIT_FAILURE); }
Merci
Partager