There's no promise that the return value from tell will be the byte offset, only that it can be used with seek to go back to the same place. On some systems, it may need to be "a magic cookie" that has the record and line number encoded opaquely, for example.