
#include <stdlib.h>#include <boost\multiprecision\gmp.hpp>using namespace std;using namespace boost::multiprecision;voID main() { mpz_int N(567014094304930933548155069494723691156768423655208899778686163624192868328194365094673392756508907687565332345345678900976543567890976543565789054335678097654680986564323567890876532456890775646780976543556789054367890765435689876545898876587907876535976565578907654538790878656543687656543467898786565457897675645657689756456578656456768654657898865567689656890795587907654678798765787897865654657897654678965465786867278762795432151914451557727529104757415030674806148138138281214236089749601911974949125689884222023119844272122501649909415937);} 但是当我编译它时说
IntelliSense: integer constant is too large
如果mpz_int不是我应该使用的,那么我应该使用什么来提升大量的int?
解决方法 从字符串构造它.您可以使用mpz_int或cpp_int.http://liveworkspace.org/code/1KKxfm $6
总结以上是内存溢出为你收集整理的C增加大量存储全部内容,希望文章能够帮你解决C增加大量存储所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)