Answer the question
In order to leave comments, you need to log in
Fixed length of number read in fscanf()?
This thing reads a number of length no more than 2
And I need it to read only and only numbers, length exactly 2, how to do this?
For example, she does not count the number 1, but 01 counts
fscanf(f, "%2u ", &ulong)
Answer the question
In order to leave comments, you need to log in
Here they said that you can use % n to control the number of characters read, but in general you need to read a string and parse it already.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question