1 Forum Post by "photographicus"
Response to: VERY large integers in c++
Posted September 27th, 2014 in Programming
At 4/12/08 04:22 PM, mikeMarek wrote: Sorry for all of the posts lately, but alot is on my mind that's been bugging me in c++.
I'm currently stuck on problem 3 in Project Euler (no, I'm not asking for the answer). I have an algorithm that will find me the solution, but the range in the numbers is too large for an integer to hold. It's a 12-digit number (600851475143) and will not fit in an integer, long int, unsigned long long, or anything else like that. So my question is, is there a way to store such a large number in c++?
Thanks for any help,
-Mike
You may try to use an arbitrary-precision integer arithmetic library. There is one consisting of just one header file here: https://code.google.com/p/infint/

