bonjour, je pense que je dois avoir un pb de pointeur (j'ai un peu honte de mon pb...). Voici ma structure WriteHardDisk
puis dans une fonction dont le prototype est
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 typedef struct { N_Vector *y; /* array of vectors containing the outputs of the particles */ Vector * nbspeprinted; /* number of the species which will be written on the hard disk */ char ** NameFileOutput; /* outputs name files */ double theta; /* crank angle */ double *P, *T; /* array of pressure and temperature */ unsigned int firstpart; unsigned int lastpart; } WriteHardDisk;
je fais
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 void PrintOutputsParticlesAllASCII(babla,pthread_t *task,WriteHardDisk * whd)
et là j'ai le message d'erreur suivant
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 double theta,T[n],P[N]; /* ici je remplis mon P,T et theta */ for(i=0;i<nbproc;++i) { whd[i]->P=P; whd[i]->T=T; whd[i]->theta=theta; pthread_create(&task[i], NULL, WriteOnHardDiskAll, &whd[i]); } /* end of for(i=0;i<nbproc;++i) */
ce qui correspond aux lignes../Sources/Mysources/functions.c:1744: error: invalid type argument of `->'
../Sources/Mysources/functions.c:1745: error: invalid type argument of `->'
../Sources/Mysources/functions.c:1746: error: invalid type argument of `->'
Je suis sûr que mon erreur est très grosse, mais je ne la vois pas. Pouvez-vous me donner un petit coup de pouce s'il vous plait ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 whd[i]->P=P; whd[i]->T=T; whd[i]->theta=theta;
Merci
Partager