摘要: 一:可以重载的操作符+ - * / % ^ & | ~ ! = > < += -= *= /= %= ^= &= |= >> << >>= <<= == != >= <= && || ++ --->* , -> [] () new new[]delete delete[]不能重载的操作符 :: . .* ?:提示:如果把运算符作为成员函数重载,那么类对象必须出现在运算符的左边。1.一元操作符可以是不带参数的成员函数或带一个参数的非成员函数。2.二元操作符可以是带一个参数的成员函数 阅读全文
posted @ 2012-10-22 17:48 IamHuskar 阅读(291) 评论(0) 推荐(0) 编辑
摘要: PrecedenceOperatorDescriptionAssociativity1::Scope resolutionLeft-to-right2++ --Suffix/postfix increment and decrement()Function call[]Array subscripting.Element selection by reference−>Element selection through pointer3++ --Prefix increment and decrementRight-to-left+ −Unary plus and minus! ~Log 阅读全文
posted @ 2012-10-22 16:19 IamHuskar 阅读(174) 评论(0) 推荐(0) 编辑