Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Fscanf reads file shaping data
Fscanf reads file shaping data
100002- The value is large, so the long int variable should be used.

9 Use commas as frame characters, 1No..

FILE * fin

long int a[ 10],b[ 10],c[ 10];

int I;

fin = fopen(....);

for(I = 0; I < = 8; i++) fscanf(fin," %d,",& ampa[I]);

fscanf(fin," %d ",& ampa[9]);

for(I = 0; I < = 8; i++) fscanf(fin," %d,",& ampb[I]);

fscanf(fin," %d ",& ampb[9]);

for(I = 0; I < = 8; i++) fscanf(fin," %d,",& ampc[I]);

fscanf(fin," %d ",& ampc[9]);