Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How to use sscanf to skip a string of data and start reading data from a certain position?
How to use sscanf to skip a string of data and start reading data from a certain position?
Int data; //Save the number after the second underline.

FILE *fp=fopen("c:\\file.txt "," r ");

Fscanf(fp, "%*[ 10]c%d%*[ 10]c", & data); //If there is no space, you can use this function to read all the data circularly. "%*[ 10]c means to skip the first 10 data, %d means to read plastic data, and \r\n means to skip the end of the line.