Hi
Just fooling around with operator overload to get used to the syntax.
I cant find out why does this not work
Please help meCode:class pet { private: int m_iAge; public: pet(int age); ~pet(); pet operator+ (pet &); }; pet pet::operator+ (pet & ptr) { return pet(m_iAge + ptr.GetAge()); } int main() { both = dog + cat; return 0; }