Xref: news2.mv.net comp.os.msdos.djgpp:3656 From: Erik Max Francis Newsgroups: comp.os.msdos.djgpp Subject: Re: i/o file handling - integers Date: Thu, 09 May 1996 18:37:54 -0700 Organization: Alcyone Systems Lines: 18 Message-ID: <31929DF2.344967D2@alcyone.com> References: <318E71BD DOT 904 AT algonet DOT se> NNTP-Posting-Host: newton.alcyone.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Rikard Thunberg wrote: [Rewrapped to ~80 columns; grr.] > What is the appropriate way to read/write integers from/to a file with the > same size as it is stored in > memory, i.e. a long integer (32bit) would occupy 4 bytes in the file. I have > reached a solution but it seems > rather clumsy: Look up fread and fwrite for this purpose. They're what you're looking for. -- Erik Max Francis &tSftDotIotE && http://www.alcyone.com/max && max AT alcyone DOT com San Jose, California, U.S.A. && 37 20 07 N 121 53 38 W && the 4th R is respect H.3`S,3,P,3$S,#$Q,C`Q,3,P,3$S,#$Q,3`Q,3,P,C$Q,#(Q.#`-"C`- && 1love && folasade Omnia quia sunt, lumina sunt. && Dominion, GIGO, GOOGOL, Omega, Psi, Strategem "Out from his breast/his soul went to seek/the doom of the just." -- _Beowulf_