Difference between Operator overloading and Functional
overloading?
Answer Posted / nsit@salem
C++ provides more than 35 operators, covering basic
arithmetic, bit manipulation, indirection, comparisons,
logical operations and others. Almost all operators can be
overloaded for user-defined types, with a few notable
exceptions such as member access (. and .*) as well as the
conditional operator. The rich set of overloadable operators
is central to using C++ as a domain-specific language. The
overloadable operators are also an essential part of many
advanced C++ programming techniques, such as smart pointers.
Overloading an operator does not change the precedence of
calculations involving the operator, nor does it change the
number of operands that the operator uses (any operand may
however be ignored by the operator, though it will be
evaluated prior to execution). Overloaded "&&" and "||"
operators lose their short-circuit evaluation property.
Operators that cannot be overloaded
| Is This Answer Correct ? | 7 Yes | 2 No |
Post New Answer View All Answers
What is flush programming?
Which one between if-else and switch is more efficient?
What is virtual methods?
How can virtual functions in c++ be implemented?
What is near, far and huge pointers? How many bytes are occupied by them?
What are the manipulators in c++?
Which is better turbo c++ or dev c++?
How would you find out if a linked-list is a cycle or not?
What are special characters c++?
What does I ++ mean in c++?
What is the array and initializing arrays in c++?
Do you know what are the new features that iso/ansi c++ has added to original c++ specifications?
What is a far pointer? where we use it?
What is a character in c++?
Is c++ pass by reference or value?