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


Please Help Members By Posting Answers For Below Questions

write a function signature with various number of parameters.

554


If dog is a friend of boy, and terrier derives from dog, is terrier a friend of boy?

603


What is static in c++?

586


Explain terminate() function?

585


What is meant by entry controlled loop? What all C++ loops are exit controlled?

556






Where do I find the current c or c++ standard documents?

573


Why was c++ created?

535


What is an overflow error?

606


What is the difference between public, private, and protected access?

606


What gives the current position of the put pointer?

550


an operation between an integer and real always yeilds a) integer result b) real result c) float result

699


What is difference between array and vector in c++?

550


What is the main purpose of c++?

528


What is an orthogonal base class in c++?

644


What does 7/9*9 equal ? a) 1 b) 0.08642 c) 0

575