Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Can't the C++ class that writes giant plastic addition use the method of dynamic memory allocation?
Can't the C++ class that writes giant plastic addition use the method of dynamic memory allocation?
For overloading num 3 = num1+num 2; Operator,

Can be added by using friend functions in the class.

A huge class

{

Friends, huge operators+(huge & amp, huge & amp);

};

Huge operator+(huge & ampc 1, huge. c2)

{

}

The value returned by the friend function is assigned by the assignment operator.