views:

69

answers:

1
class CDate
{
  // some declarations
  public: 
    CDate& operator ++ ()
    {
      // increment function;     
      return *this; 
    }
};

Does the '&' mean a reference that is being a return?

Thanks

SpecC

+4  A: 

Yes, you answered your own question. CDate & simply means that the operator returns a reference to a CDate object. It has no special meaning because it's an operator, it means the same in any other function.

casablanca
SpecC
casablanca
David Rodríguez - dribeas