www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/19/17:21:31

From: "Spike" <spike AT S-DirektNET DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: HELP: File-I/O under DJGPP ???
Date: 19 Feb 1999 21:53:48 GMT
Organization: Customer of UUNET Deutschland GmbH, Dortmund, Germany
Lines: 28
Message-ID: <01be5c52$32c81680$96ab9bc1@default>
NNTP-Posting-Host: 193.155.171.150
X-Newsreader: Microsoft Internet News 4.70.1160
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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 (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?

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?

I really NEED help fast!

Fozzie

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019