Given the following code snippet,
class Num { public: Num(int iNumber = 0) : m_iNumber(iNumber) {} Num operator+=(const Num& rhs) {
Your operator function could also be written as
Num& operator += (const Num& rhs) { m_iNumber += rhs.m_iNumber; return m_iNumber; }
*this->m_iNumber and m_iNumber by itself within a member function are the same and using the former format is more typing in my opinion.
*this->m_iNumber
m_iNumber