All the operators can be overloaded using the member function operator overloading.

Sơn Lê

Member
All the operators can be overloaded using the member function operator overloading.
A. True
B. False
 
Answer: b
Explanation: It is not the case that all the operators can be overloaded using the member operator overloading. There are some cases where the operators must be overloaded using the friend function only. The reason behind is that the left operand should be passed *this pointer, but the left operand in these cases might be object of some other class. Hence can’t be done.
 

Tìm kiếm

Back
Top