no save
Assistance
Achat
News

Forum | programmation
ouvrir plusieurs fichiers
kamans, le dim. 14 juin 2009 à 01:05:00
Bonjour,
voila, je fait un petit programme en langage c, mon probleme c'est que j'arrive pas à ouvir et ecrire dans plusieurs fichiers en meme temps.
mon code

char dest[100][20], file[100][20];

src=fopen(argv[1],"r");
for(i=0;i<p;i++)
{
strcpy(dest[i],"dest");
sprintf(s,"%i",i);
strcat(dest[i],s);
strcpy(file[i],"file");
strcat(file[i],s);
FILE *dest[i];
dest[i]=fopen(file[i],"w");
}
.
.
.
if (strcmp(mot ,"@<TRIPOS>MOLECULE")==0)
{
nb[i]+=1;
}
fprintf(dest[i],"%s",buff); // warning: passing argument 1 of ‘fprintf' from incompatible pointer type

.
.
.
fclose(src);
for (i=0; i<parties;i++)
{
fclose(dest[i]); // warning: passing argument 1 of ‘fprintf' from incompatible pointer type
}


SVP pouvez vous me corriger ce code. MERCIConfiguration: Linux
Firefox 3.0.10


bizu53
14 juin
Suivant
REPONSES
bizu53
14 juin
kamans
14 juin
bizu53
14 juin
kamans
14 juin
bizu53
14 juin
Version Web
Réalisé par RedShift
no save