读取范围Reading Ranges

ANSI 4.9.6.2:短划线 (-) 字符的解释,该字符既不是 fscanf 函数的 % [ 转换的扫描表中的第一个字符,也不是该表中的最后一个字符ANSI 4.9.6.2 The interpretation of a dash (-) character that is neither the first nor the last character in the scanlist for % [ conversion in the fscanf function

下面的行The following line

fscanf( fileptr, "%[A-Z]", strptr);  

将 A-Z 范围内的任意数目的字符读取到 strptr 指向的字符串中。reads any number of characters in the range A-Z into the string to which strptr points.

另请参阅See Also

库函数Library Functions