I need to read the contents of a file. I may be using fgets. I need to verify if the contents of the string is a 4 digit number.
sample
.
.
.
while not feof 0
fgets 0 fromfile
; this is where I need some help
endwhile
.
..
in the fromfile string, there could be a 4 digit number. How can I check? Disregard the string index. Assume the string fromfile has a length of 4.
Thank you
sample
.
.
.
while not feof 0
fgets 0 fromfile
; this is where I need some help
endwhile
.
..
in the fromfile string, there could be a 4 digit number. How can I check? Disregard the string index. Assume the string fromfile has a length of 4.
Thank you