1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
int lgMax[16]={30,6,100,100,40,20,40,40,100,100,100,100,100,10,40,40};
for(i=0;i<zone;i++)
{
strcpy(champ,&ligne[position[i]]);
lgMax[0]=30; //remet la valeur a 30 sinon bug... je c'est pas pourquoi
if(strlen(champ)>lgMax[i])
{
strcpy(champ," ");
}
if(i==2)
printf("%d ",lgMax[0]);//affiche 30
while(strlen(champ)<lgMax[i]+1)
strcat(champ," ");
//lgMax bug après la boucle quand i=2
if(i==2)
{
printf("%d ",lgMax[0]);//affiche 0
exit(0);
}
fwrite (champ , 1 , lgMax[i] , fDest );
} |
Partager