what are these classes this is a code snip from a program I am doing for homework creating a big int calculator. I do not know how they all tie together or relate anyone ??? thnaks.
BigInt BigInt::operator+(const BigInt& rightOperand) const {
return add(rightOperand);
}
BigInt BigInt::operator-(const BigInt& rightOperand) const {
return subtract(rightOperand);
these are classes with bigint being passed in by reference???
and the values are const???? and light or a step by step would be great..
BigInt &BigInt::operator+(const BigInt& rightOperand) { // Note the additional & and removal of const
add(rightOperand); // Do not return add
return *this; // return this in order to achieve bi1 + bi2 + bi3 ...
}
this is a Bigint class creating a Bigint object with a method operator + passing in a constant BigInt by reference (num array ) and a rightOperand that is also a constant. how do i get it to return? do i load add?