【发布时间】:2021-06-11 03:29:10
【问题描述】:
我目前正在尝试使用这个用于 c++14 的 BitInt 库来执行更大的计算。
https://faheel.github.io/BigInt/
每当两个 BitInt 相乘时,就会出现一个错误。 我重新安装了 Visual Studio 和底层编译器,并且正在运行最新版本。
错误信息
The thread 0x2918 has exited with code 0 (0x0).
Exception thrown at 0x00007FFDA337F530 (ucrtbased.dll) in MyProg.exe: 0xC0000005: Access violation reading location 0x00007FF8A3E3A84F.
这是我的代码
#include <iostream>
#include "../BigInt/BigInt.hpp"
int main()
{
BigInt big1, big2;
big1 = "2";
big2 = "9876543210123456789098765432101234567890";
std::cout << (big1 * big2).to_string();
// std::cout << big1 * big2 * 123456 << "\n";
return 0;
}
截图
【问题讨论】:
-
0.5.0 版本适合我