c++面向对象编程的题目
来源:百度知道 编辑:UC知道 时间:2024/05/16 06:38:33
写个大数加减乘除吧
题目如下:
The int basic data type provided by the C/C++ language to represent integers
has the following limitations -- the size of the data type is machine dependent
and also is limited in the smallest and largest integer that it can represent.
In this assignment you have to implement a class BigInt, which allows a
programmer to declare and use integers of arbitrary length. You have to support
basic arithmetic operations and relational operations objects of this data type.
You should also be able to read and write BigInts from and to stdin and stdout
respectively.
A programmer should be able to use BigInt in a C++ program just like the type
int as given in the example below:
Program
#include <iostream.h>
#include "BigInt.h"
#define SIZE 5
BigInt big_array[SIZE], minint, maxint;
int main()
{
BigInt sum(0); //