How does C++ compiler differ between overloaded postfix and prefix unary operators?
A. C++ does not allow both operators to be overloaded in a class.
B. A postfix ++ has a dummy parameter
C. A prefix ++ has a dummy parameter
D. By making prefix ++ as a global function and postfix as a member function
查看答案
Which of the following operator functions cannot be global, i.e., must be a member function?
A. new
B. delete
C. conversion operator
D. All of the above
Which of the following operator functions cannot be global, i.e., must be a member function?
A. ()
B. []
C. =
D. all of the above
Binary operators can be overloaded as non-member functions, but unary operators can only be overloaded as member functions.
A. 对
B. 错
How an operator works on built-in types cannot be changed by operator overloading.
A. 对
B. 错