c++ - 如何求和两个或三个大数?

标签 c++

<分区>

Possible Duplicates:
how to sum a large number of float number?
“BigInt” in C?
handling integer having large number of digits

我想求和两个不同的数字。 认为我们有两个不同的数字,任何人的长度都超过 20 个数字,我怎样才能将两者相加?据我所知,我无法使用 int 执行此操作。

像这些:

26565468416574156465651652464234245645945643526 + 6264635454513215421541412154121541544455412315

最佳答案

有很多库可以做到这一点,您也可以自己实现。检查这个Wikipedia article .

关于c++ - 如何求和两个或三个大数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6083473/

相关文章:

c++ - 在极值中初始化浮点变量

c++ - () 运算符在左侧 C++ 重载

c++ - C++ 中 M 个盒子中 N 个球的排列

c++ - 使用 pthread_join ( thread, NULL) 的混淆

C++ 结构化绑定(bind) : What is the standard order of destruction?

c++ - 关于为什么 Windows 的 .dll 不适用于 Linux 的细节

c++ - 使用 scanf 读入 std::string

c++ - 如何以编程方式在 Eclipse 中获取 "available software sites"

c++ - "find"的递归版本和非递归版本有什么区别?

android - C++参数匹配/推导