Operator Overloading in C++

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
posted @ 2013-03-25 14:03  macemers  阅读(272)  评论(0编辑  收藏  举报