哪种数据类型可以在C ++中存储多达1000位数? [英] Which datatype can store upto 1000 digits in C++?
本文介绍了哪种数据类型可以在C ++中存储多达1000位数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在编写一个程序,可以处理多达1000个非负整数。
我查了一下,发现只有未分配的long long int可以存储最多的数字。
还有其他解决方案吗?
我的尝试:
全部查看标准数据类型
解决方案
看看bigint(又名大整数)
biginteger - C ++中BigInt类的一个很好的基本实现 - Stack Overflow [ ^ ]
C ++ BigInt类下载| SourceForge.net [ ^ ]
GitHub - kasparsklavins / bigint:一个用于c ++的轻量级大整数库 [ ^ ]
Big Integer Implementation - C ++论坛 [ ^ ]
I am writing a program that can process upto 1000 non negative integers.
I checked and found only unassigned long long int can store the highest number of digits.
Any other solutions?
What I have tried:
Checked all standard datatypes
解决方案
Have a look to bigint (aka big integers)
biginteger - A good and basic implementation of BigInt class in C++ - Stack Overflow[^]
C++ BigInt class download | SourceForge.net[^]
GitHub - kasparsklavins/bigint: A lightweight big integer library for c++[^]
Big Integer Implementation - C++ Forum[^]
这篇关于哪种数据类型可以在C ++中存储多达1000位数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文