C++ Programming - OOPS Concepts - Discussion
Discussion Forum : OOPS Concepts - General Questions (Q.No. 41)
41.
Which of the following operators cannot be overloaded?
Discussion:
13 comments Page 1 of 2.
Md Hayatuddin said:
5 years ago
Can we overload -> operator?
Because it is similar to. (dot) operator.
Because it is similar to. (dot) operator.
(1)
Vani said:
6 years ago
?: (conditional).
. (member selection).
.* (member selection with pointer-to-member).
:: (scope resolution).
sizeof (object size information).
typeid (object type information).
So, it can't be overloaded.
. (member selection).
.* (member selection with pointer-to-member).
:: (scope resolution).
sizeof (object size information).
typeid (object type information).
So, it can't be overloaded.
Prashant giri said:
8 years ago
-> pointer member selection operator also can not overloaded.
Sankar said:
8 years ago
Can anyone explain about this question?
(1)
Shailendra said:
10 years ago
Except of this operator all operator can be overload.
?: (conditional).
. (member selection).
.* (member selection with pointer-to-member).
:: (scope resolution).
sizeof (object size information).
typeid (object type information).
?: (conditional).
. (member selection).
.* (member selection with pointer-to-member).
:: (scope resolution).
sizeof (object size information).
typeid (object type information).
Nilesh said:
1 decade ago
Which operators are overloaded?
Sujatha said:
1 decade ago
What is sizeof operator?
Roopesh said:
1 decade ago
The process of making an operator to exhibit different behavior at different instances is known as operator overloading.
Conditional operator cannot be overloaded.
Conditional operator cannot be overloaded.
Gaurav said:
1 decade ago
Why it can't be overloaded?
Andrei said:
1 decade ago
Overloading operators refers to adding functionality to an operator, similar to overloading function or constructor.
For example you can tell the "+" operator how to add adrian.points=alex.points+chriss.points....And by the way, .* cannot be overloaded, but * can. suppose you want to multiply the points in the object from last example as adrian.points=alex.points*chriss.points.
For example you can tell the "+" operator how to add adrian.points=alex.points+chriss.points....And by the way, .* cannot be overloaded, but * can. suppose you want to multiply the points in the object from last example as adrian.points=alex.points*chriss.points.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers