Mihail Mihaylov wrote:
> Is there a way in C++ ( using the iostream.h ) or in C ( using the
> stdio.h and the like ) to control precisely how
> data gets saved to a file. What I mean by this is, can I control exactly
> at which offset within the file my data blocks will go.
Sure. Use fseek() to set the offset before writing the data.
If you're not writing any data sequentially, it's more efficient to
either use the Unix functions (open, lseek, write, close), or to
disable buffering with e.g. setbuf(fp, NULL).
--
Glynn Clements <[EMAIL PROTECTED]>