Adding two numbers using operator overloading

Jun 11, 2012 at 3:11pm
Hi All,

I came across a question where by the requirement was to add two 50 digits number using c++. The expectation was to use operator overloading.

Could some one help me with this. I have seen in website, how to add two complex numbers using operator overloading. But did not find any answer to this.

Regards
kochu
Jun 11, 2012 at 3:26pm
Overloading operators can be used when at least one operand is of type class or enumeration. So at first you should write your class of such numbers and only after that ask the question about overloading operators.
Last edited on Jun 11, 2012 at 3:40pm
Topic archived. No new replies allowed.