题目内容

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. 错

Given the fragmented definition of the A class.class A{public:A(): num1(0), num2(0){}private:int num1, num2;};int main() {A a1, a2;cin>>a1>>a2;a2 = a1 + 10;A c = 4.5 + a1;a2++;cout <

答案查题题库