to calculate addition more than 30 digits

how to calculate addition of two very large positive integers. The size of input integer is larger than C++ can handle, e.g. more than 30 digits.
Most commonly, use a bigint library made for this sort of thing.

If you don;'t have much experience with libraries, there are header-only versions that require you to do no more than download and #include a file.

Store/convert the numbers as two separate integer arrays (<vector>'s or <list>'s even) and "add with carry". The biggest pains with this, if you could call them that, are sizing the answer array (the others not so much) and numbers read for us from right to left.
Topic archived. No new replies allowed.