Running on Widows 7 with MSVS 2010
I am following this tutorial to understand how to use MPIR library for adding two big integers
I understand this library should help me in adding very big numbers as shown in the program below:
#include < stdio.h>
#include < stdlib.h>
#include < gmpxx.h>
#include < iostream>
using namespace std;
void main(int argc, char *argv[])
{
mpz_class answer_a = 111111111111111111111111111111111111111111111111;
mpz_class answer_b = 111111111111111111111111111111111111111111111111;
mpz_class answer_c;
answer_c= answer_b + answer_a ;
cout << answer_c<<"\n";
}
But still I get error C2177: constant too big
.
Did I misunderstand MPIR ?