Time:09-22
CodePudding user response:
fopen to open the file, then read fread to variables such as I, fread (& amp; I,...
can baidu fscanf
fread directly after use atoi no,,,
# include Int main () {1. TXT FILE * FILE=fopen (" ", "rb"); Char ch_tmp [1024]. Fread (ch_tmp, 1024, 1, file); Int num=atoi (ch_tmp); The fclose (file); Printf (" num=[% d] \ n ", num); Return (0); }
Page link:https//www.codepudding.com/Backend/19924.html