作者:fo切為祢 | 来源:互联网 | 2023-05-18 13:41
RunningonWidows7withMSVS2010使用MSVS2010的寡妇7Iamfollowingthistutorialtounderstandhow
Running on Widows 7 with MSVS 2010
使用MSVS 2010的寡妇7
I am following this tutorial to understand how to use MPIR library for adding two big integers
我将通过本教程了解如何使用MPIR库来添加两个大整数
I understand this library should help me in adding very big numbers as shown in the program below:
我明白这个图书馆应该帮助我增加非常大的数字,如下图所示:
#include
#include
#include
#include
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 <
But still I get error C2177: constant too big
. Did I misunderstand MPIR ?
但我还是会得到错误C2177:常数太大。我是否误解了MPIR ?
1 个解决方案