Is it possible to open a file and reading an only byte at a certain position without having to load all the file into an array?
For example, having a file of 10 bytes, and reading the 5th.
Yes, fseek
and fgetc
will do exactly this.
http://www.cplusplus.com/reference/clibrary/cstdio/fseek/
http://www.cplusplus.com/reference/clibrary/cstdio/fgetc/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With