#include #include class BigInt{ private: /* This is the syntax to have a const data member of a class. */ static const int NUM_DIGITS = 20; int num[NUM_DIGITS]; public: void read_num(ifstream&); /* reads in an integer from the input file */ void print_num(); /* prints out the integer to the screen */ BigInt sum(BigInt); /* You should implement this function below. */ }; void BigInt::read_num(ifstream& infile){ int a[NUM_DIGITS], i,j; char inp; /* skip everything before the first integer starts */ do infile.get(inp); // similar to infile >> inp, but doesn't // skip over white space. while (inp<'0' || inp>'9'); a[0] = inp - '0'; for(i=1; i=0; i--){ if (num[i]) initialzero = false; if (!initialzero || i==0) cout << static_cast(num[i]+'0'); } } void main(){ ifstream infile("bignums.dat"); /* this declares the object infile */ // You should declare the BigNum objects you'll use in the program. // To read a BigNum object n1 in from bignums.dat, write n1.read_num(infile); // Read in the rest of the objects from bignums.dat // Compute the sums and do the output here. }