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
Explain deep copy and a shallow copy?
What do you know about near, far and huge pointer?
What is a stack c++?
what is Member Functions in Classes?
Explain the auto storage classes in c++.
What is the difference between #define debug 0 and #undef debug?
What is the best way to declare and define global variables?
Search for: what is pair in c++?
What happens when you make call 'delete this;'?
Is rust better than c++?
What happens if a pointer is deleted twice?
What is algorithm in c++ programming?
Can a program run without main in c++?
What do you mean by function overriding & function overloading in c++?
Define token in c++.