What exactly is an 'offset' to something?
What exactly is an 'offset' to something?
Crummy explanation? The 'offset' is the number of char's succeeding the pointer position.
An example would be reading a file starting at '20':
ifile.read(20, record.fname);
The offset is 20 char's into the file from where the pointer is currently set.
I believe that 'offset' is used more generically than that, but you can grasp the idea from my example.
-Skipper
"When the only tool you own is a hammer, every problem begins to resemble a nail." Abraham Maslow
mmmmmmmmm....barely. I guess I am looking for the generic term then. Does it matter on context/usage?
If you have a binary file offset 0 is the first byte, offset 1 is
the second byte etc.
It can also be used when talking about a memory addresses.