How can I add very large numbers in C++?
You could use a library like LiDIA for a 'big integer' class.
You can find a big decimal implementation at http://speleotrove.com/decimal/
How big is "very large"? A signed long int can go up to 2,147,483,647 and an unsigned long int can go up to 4,294,967,295.
consider a "bignum" library like: http://gmplib.org/ or http://ttmath.slimaczek.pl/ttmath. take a look at a simple bignum class: http://www.circlemud.org/~jelson/560/
Do a Google on "Bigint C++" This will provide you with a list of arbitrator precision integer arithmetic libraries.
GMP has a GMPXX C++ wrapper which is kind of nice. GMP supports both integer and floating point numbers, and is LGPL'ed.
I've used it. It's ok, but watch out for creating lots of temporaries. (Potential efficiency hit.)