#include#include using namespace std;class BigNumberMutiplication{private: char *num1; char *num2; char *result; int lenNum1; int lenNum2; void reverseNumerbs(); void reverseNumber(char *s);public: BigNumberMutiplication(char *num1,char *num2); char *Mutiplicate(); void Test();};BigNumberMutiplication::BigNumberMutiplication(char *num1,char *num2){ this->num1=num1; this->num2=num2; this->lenNum1=strlen(num1); this->lenNum2=strlen(num2); int len=this->lenNum1+this->lenNum2+1; result=new char[len]; memset(result,'0',len*sizeof(char)); result[len-1]='\0';}void BigNumberMutiplication::reverseNumber(char *s){ int len=strlen(s); int i=0; while(i num1); reverseNumber(this->num2);}void BigNumberMutiplication::Test(){ cout< num1< < num2< reverseNumerbs(); cout< num1< < num2< reverseNumerbs(); int i=0; int j=0; for(i=0;i lenNum1;i++) { int incrs=0; int addIncrs=0; for(j=0;j lenNum2;j++) { int multiTmp=(this->num1[i]-48)*(this->num2[j]-48)+incrs; incrs=multiTmp/10; int rest=multiTmp%10; int addTmp=(this->result[i+j]-48)+rest+addIncrs; addIncrs=addTmp/10; this->result[i+j]=addTmp%10+48; } this->result[i+j]+=addIncrs+incrs; } this->reverseNumber(this->result); return this->result;}int main(){ char a[]="12345678909876543210"; char b[]="12345678909876543210"; cout< < < < Mutiplicate(); cout< < >s;}