Making custom-sized ints?

Hello all.

How do I make custom-sized ints/doubles/etc., such as 42-bit ints, instead of the standard 32-bit ones?

Thanks!
~Yuan
The short answer is that you can't.

The long answer is that you can make numbers of arbitrary size and operate on them (but you'll have to define your own operations).
http://en.wikipedia.org/wiki/Arbitrary_precision_arithmetic

Here's a widely used library for arbitrary precision numbers: http://gmplib.org/
Thanks for the links; they've been very helpful. I'll make numbers of arbitrary size. :)

Thanks again!
~Yuan
isnt the following similiar?
1
2
3
4
5
struct
{
    long bla : 6
     char blubb[6] : 42
};
Topic archived. No new replies allowed.