Advertisements
Advertisements
Question
Describe the syntax of an Operator Function.
Solution
return-type class-name : : operator op(argument list) { function body//task defined } |
Where return type is the of value returned by the specified operation and op is the operator being overloaded.
The op is preceded by the keyword operator. Operator op is the function name.
shaalaa.com
C++ Programming
Is there an error in this question or solution?