Let's say we have a really, really, big number (a hundred thousand digits or more)
We can store this number in java using "Bigint" but I don't know how we could do this in C++. How can we store a number this large in C++?
Let's say we have a really, really, big number (a hundred thousand digits or more)
We can store this number in java using "Bigint" but I don't know how we could do this in C++. How can we store a number this large in C++?
You have to use bignum arithmetic which isn't included in standard C++ library so you either have to write it yourself or use some third party library.
About storing specifically - well it could be stored as an array (or vector) of unsigned ints less than 10000 for example which will represent it's numbers "digits" by base 10000. There could be a lot of other ways though depending on exact arithmetic implementation.