标签:his net art nsis 运算符 operator amp 函数 bsp
可看一博主文章http://blog.csdn.net/insistgogo/article/details/6626952
下面是自+1的函数重载
//单目运算符重装++, --
Person& operator++() //++a;
{
this->age += 1;
return *this;
}
Person operator++(int) //a++
{
Person old(*this);
this->age += 1;
return old;
}
标签:his net art nsis 运算符 operator amp 函数 bsp
原文地址:http://www.cnblogs.com/kirk1995/p/7229729.html