Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - About reading C language files, how to read integer data from text files and assign them to plastic variables! please ...
About reading C language files, how to read integer data from text files and assign them to plastic variables! please ...
This is no trouble:

Look at this example.

FILE*p=fopen("file.txt "," r ");

int x,y,z;

fscanf(p," %d%d%d ",& ampx & amp; y & amp; z);

printf("Read:\nx=%d,y=%d,z=%d\n ",x,y,z);

fclose(p);