मराठी
महाराष्ट्र राज्य शिक्षण मंडळएचएससी विज्ञान (संगणक विज्ञान) इयत्ता १२ वी

Describe the syntax of an Operator Function. - Computer Science 1

Advertisements
Advertisements

प्रश्न

Describe the syntax of an Operator Function.

कोड लेखन
लघु उत्तर
Advertisements

उत्तर

The general form of operator function is,

return-type class_name::operator op(argument list)
{
function body//task defined
}

Where return type refers to the value returned by the given operation, and op refers to the operator being overloaded. The keyword operator comes before the operation. The function is called Operator op. Operator functions must be member (non-static) or friend functions.

shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2016-2017 (March)
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×