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

Explain Difference Between Operator Function as Member Function and as a Friend Function - Computer Science 1

Advertisements
Advertisements

प्रश्न

Explain difference between Operator Function as Member Function and as a Friend Function

टीपा लिहा

उत्तर

The basic difference between operator function as a friend function and as member function is that a friend function will have only one argument for unary operators and only one for binary operators. This is because the object used to invoke the member function is passed implicitly and therefore is available for the member function. This is not the case with friend function. Arguments may be passed either by value or by reference.

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

Englishहिंदीमराठी


      Forgot password?
Use app×