Saturday, December 11, 2010

Really simple question about creating non-standard sized byte groups

Programmer Question

So for a project that space really matters in, I'd like to be able to write to a file a number which takes up THREE bytes. So essentially, an unsigned type where 16,777,215 is the highest possible number.



The number is given as an unsigned int, and I've already checked to ensure it's between 0 and 16,777,215. How do I go beyond that?



Code in Java is preferred, but ANSI C works too. Thanks!



Find the answer here

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails