renegadeandy
12-11-2011, 01:22 AM
Hey guys.
I have a text file called test.txt
Inside it will be a number, it may be as follows:
1
2391
32131231
3123121412
I.e it could be any size of number, from 1 digit up to x digits.
The file will only have 1 thing in it - this number. I want a bit of code using fread which will read that number of bytes from the file and put it into an appropriately sized variable.
Can anyone suggest the best way to solve this problem?
I have a text file called test.txt
Inside it will be a number, it may be as follows:
1
2391
32131231
3123121412
I.e it could be any size of number, from 1 digit up to x digits.
The file will only have 1 thing in it - this number. I want a bit of code using fread which will read that number of bytes from the file and put it into an appropriately sized variable.
Can anyone suggest the best way to solve this problem?