您的位置:首页 > 编程语言 > C语言/C++

Operator Overloading in C++

2013-03-25 14:03 351 查看
The only operators that can't be overloaded are the operators for scope resolution (::), member selection (.), and member selection through a pointer to a function(.*).

Almost all operators can be overloaded in C++:

+       -       *       /       %       ^       &       |
~       !       ,       =              =
++      --      <<      >>      ==      !=      &&      ||
+=      -=      /=      %=      ^=      & =     |=      *=
<<=     >>=     [ ]     ( )     ->      ->*     new     delete

http://www.cprogramming.com/tutorial/operator_overloading.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: