dimanche 19 avril 2015

How can I add two strings that contain integer to find the sum?

I try to find the sum of two strings without having to convert to integer like using atoi or stoi It is BigInt class implementation


Example of two strings:



BigInt a("-1000");
BigInt b("+999");


I have a class which private members are:



private:
string data;
bool negative;


The purpose of this question is to write a arithmetic operations like +,-,/,*


Aucun commentaire:

Enregistrer un commentaire