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 an arraylist c++?
What is lambda expression c++?
What are the various access specifiers in c++?
What is the use of structure in c++?
What is size of string in c++?
What are the classes in c++?
What is the most common mistake on c++ and oo projects?
Why do we use templates?
What is meant by const_cast?
Declare a class vehicle and make it an abstract data type.
What character terminates all character array strings a) b) . c) END
What is the difference between an enumeration and a set of pre-processor # defines?
What does count ++ do in c++?
What is the iunknown interface?
Which bitwise operator is used to check whether a particular bit is on or off?