Mail Archives: djgpp/1999/02/19/20:00:55
Spike wrote:
>
> Hi!
>
> I am writing a little class for loading .pcx-files and showing them on the
> screen.
> My problem is that I use the following code to open a .pcx-file and read it
> as follows:
>
> int handle;
> handle=open(name);
If this isn't just pseudo-code, note that `open' has some other args.
> if (handle<0) { cout<<"ERROR!"; exit(1); }
>
> Clear so far? I hope so, as this was just the opening of the file.
>
> I read it like this:
>
> int variable;
> read(handle, variable, sizeof(int));
>
> OK?
No. Should be `&variable'.
> My Problem now is that I need to change my position in the file (normally I
> use fseek or such a kind but here it doesn't work).
> What can I do to change my position?
info libc alpha lseek
--
Nate Eldredge
nate AT cartsys DOT com
- Raw text -