When you need to handle a number in a program that is larger than any built in datatypes allow (in my case a 64bit unsigned integer) what's the best way to go about it?
When you need to handle a number in a program that is larger than any built in datatypes allow (in my case a 64bit unsigned integer) what's the best way to go about it?
Well some compilers have __int64
some other compilers have long long int
If you want to go larger still (or your compiler has neither of those), then tryGMP
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Thankfully my compiler does in fact support __int64. I would've really dissliked having to add a huge library to my program for the extremely limited use I'd have for it.