class CDate
{
// some declarations
public:
CDate& operator ++ ()
{
// increment function;
return *this;
}
};
Does the '&' mean a reference that is being a return?
Thanks
SpecC
class CDate
{
// some declarations
public:
CDate& operator ++ ()
{
// increment function;
return *this;
}
};
Does the '&' mean a reference that is being a return?
Thanks
SpecC
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.