首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > 第二作业先进CPP编程考试@ mastergd 2012维罗纳

第二作业先进CPP编程考试@ mastergd 2012维罗纳

资 源 简 介

Design a class (or a class library) to handle unlimited integer operations (integer larger) Provide the class standard overloaded arithmetic operators. Follow the rules "do as ints do". Write a test for BigInt operations: Example: { BigInt x = 569; // ctor with an integer BigInt y; // default ctor y = pow(x, 10); // 569*569*...*569 ten times (a big number!) BigInt z = x; //copy ctor z = x; // operator= z += y; // operator+, operator+=, -, -=, *, *= z %= y; // operator%, operator/ operator%= z %= 5; // same operators of above... it is better to provide overloads for int or just convert int to BigInt? BigInt w("348734834853836786386736"); // yeah, ctor that takes a string! w++; // postincrement, preincrement if(w <= y) // yeeeah, comparison! <, <=, >, >=, ==, != z &= x; // bitwise and, or, xor... std:: cout << y; // obviously streams operators... x =

文 件 列 表

mgd-cpp-bigint
.svn
214124124431412132545^1840.txt
BigInt.cpp
BigInt.h
BigInt.sln
BigInt.vcxproj
BigInt.vcxproj.filters
BigIntTest.cpp
BigIntUtilities.cpp
BigIntUtilities.h
Exceptions.h
gtest-1.6.0
Readme.txt
Types.h
UnsignedBigInt.cpp
UnsignedBigInt.h
VIP VIP
0.191289s