www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/28/10:04:45

Date: Mon, 28 Jul 1997 10:03:23 -0400 (EDT)
From: "Art S. Kagel" <kagel AT ns1 DOT bloomberg DOT com>
To: "John M. Aldrich" <fighteer AT cs DOT com>
Cc: djgpp AT delorie DOT com
Subject: Re: ifstream (FILENAME, ios::binary). Can't Read!!!
In-Reply-To: <33D7B901.1B29@cs.com>
Message-Id: <Pine.D-G.3.91.970728100222.19151B-100000@dg1>
Mime-Version: 1.0

On Thu, 24 Jul 1997, John M. Aldrich wrote:

> A. Sinan Unur wrote:
> > 
> > > > do you ever expect to read a fractional number of bytes from a file?
> > >
> > > No, I just used it cause I always think of doubles as being able to
> > > count to a higher number than ints.
> > 
> > for reasons that are too mundane to explain and take up bandwidth with,
> > that is not a good idea. if you insist, you can do it of course, but you
> > will be in for a pretty hectic ride.
> 
> If, for some reason, you seriously expect that your program might read
> more than 4 billion bytes of data from a file, you can use the long long
> integer type.  This is a 64 bit integer; the upper limit of which is
> approximately 1.845 x 10^19.  It's gcc-specific, but involves less
> overhead than float->int conversions.
> 
> BTW, I just wrote a little program to print out the maximum value of a
> 64 bit integer:
> 
> 18446744073709551615
Unsigned.  Signed that would be:
9223372036854775807
JMTC

Art S. Kagel, kagel AT bloomberg DOT com

- Raw text -


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