Mail Archives: djgpp/1998/07/16/05:15:44
Lord Daedron wrote:
> I wish to store
> the file sizes of all files packed in my compressed archive, along
> with the
> total of all file sizes. Using an unsigned int ( I read this is same
> as
> unsigned long? )
In DJGPP and many Unix systems, yes.
> this gives me a maximum of about 4 megs ( any bigger
> numbers will overflow ).
You mean four gigs. 2^32 = 2^2 x 2^30 = 4 x 1024^3.
Four gigs is a lot. Are you sure you're not just misunderstanding the
size limitation?
> Is there a bigger integer type or a class for
> stroing really huge numbers so I could install more than 4 megs?
There is a nonstandard GNU extention for the long long, which is 64
bits. Or, you could always tally up the file sizes in larger increments
(i.e., only counting 1024 or 1024^2 byte increments, rather than every
single byte).
--
Erik Max Francis, &tSftDotIotE / mailto:max AT alcyone DOT com
Alcyone Systems / http://www.alcyone.com/max/
San Jose, California, United States / icbm:+37.20.07/-121.53.38
\
I put away my nine, fool / 'cause I'm colorblind.
/ Ice Cube
- Raw text -