very big natural number

Is there a data type that can store any natural number? The natural number may be 0 or 121281237129432746237 or even longer.
Is there a data type that can store any natural number?


No, of course not!

But check out the link above, since it will permit you to store arbitrarily large numbers up to system memory constraints.
The largest int data type available in C++ is uint64_t. You can also call it unsigned long long or __hyper. However, this type is still limited. It will only go up to 2^64-1. There are complicated methods you can use to do calculations with large numbers, but using gmp would be easier.
Last edited on
Another nice library:
http://www.ttmath.org/ttmath
Thank you! How can I install gmp in a windows-like system? Is there an istalling programme or ''include'' file?
Topic archived. No new replies allowed.