Adding long numbers,(adding two strings which contain int)

I have two strings. For example, "1234567891011" and "11223232323232". I want to add them, so that i get the correct result(mathematically).
I can't concatenate the strings.
I have tried converting them to int and then adding. But that only works for small strings, as int has an upper bound.
I want my program to work for any std::string object. No matter how long.
As i am just thinking of the way, there is no useful code to post. Thanks for your help.
its the problem on your IDE, but adding them using an int, its a problem because the digits is not an octal anymore
you can try boost multiprecision

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <boost/multiprecision/cpp_int.hpp>
#include <iostream>
#include <iomanip>
#include <string>
using boost::multiprecision::checked_int128_t;

int main()
{
    checked_int128_t first_num("1234567891011");
    checked_int128_t second_num("11223232323232");
    checked_int128_t result = first_num + second_num;

    std::cout << result << std::endl;

    std::cin.ignore();
    return 0;
}


output
12457800214243
@Yanson he will not understand it hes beginner zz
@Lorence30: Are you sure?

The fact is that all the basic types have limits and the only way is to implement "unlimited int". Luckily, that wheel has been invented multiple times and the question becomes: Which BigInt library to use? The current C++ standard has taken some bits from Boost, so Boost can potentially have a decent package for this too.
i see basic types has a limit.. where can i have that boost?
Websearch. Learn it.
http://www.boost.org/
Topic archived. No new replies allowed.