Big integer in C or C++ [closed]
I was working on a factorial program, and the program didn't work when trying to find the factorial of 1000. I think big integers are the solution; how do they work? (In either C or C++)
Solution 1:
GMP can do bigint
operations for both C and C++. The documentation on that site is a good introduction, if you use the C++ classes they behave almost exactly like built-in primitive types.
Solution 2:
Look for the GMP. See the other question regarding this topic:
- Handling very large Integers
- C++ Big Integer