Date: Mon, 28 Jul 1997 10:03:23 -0400 (EDT) From: "Art S. Kagel" To: "John M. Aldrich" Cc: djgpp AT delorie DOT com Subject: Re: ifstream (FILENAME, ios::binary). Can't Read!!! In-Reply-To: <33D7B901.1B29@cs.com> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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