Reading into & from a buffer
wondering if someone could help on best way to read a file into a buffer in such a way as to be able to set the seek() on the buffer (or file position), and then read from that buffer based on the buffer's (file) position? Instead of using &read() function for every call.
Firstly read a whole file into a buffer.
And then using the buffer, being able to do something like this;
offset = 0;
I'm still relatively new to file i/o, so any help would be great.