Quote Originally Posted by yellowmat
As follow
Qt Code:
  1. bool CClassA::operator==(const CClassA& aca)
  2. {
  3. if( m_dAMember == aca.m_dAMember )
  4. return true;
  5. else
  6. return false;
  7. }
To copy to clipboard, switch view to plain text mode 
Make it:
Qt Code:
  1. bool CClassA::operator==(const CClassA& aca) const
  2. {
  3. return ( m_dAMember == aca.m_dAMember );
  4. }
To copy to clipboard, switch view to plain text mode 
Note the "const" at the end of function header.