operator overloading for (), [], ->

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jinendrashankar
    New Member
    • Nov 2007
    • 10

    operator overloading for (), [], ->

    why operators (), [], -> and = can be overloaded only by class members.

    or
    why operators (), [], -> and = can not be overloaded by friend function.
  • Ganon11
    Recognized Expert Specialist
    • Oct 2006
    • 3651

    #2
    Sounds like a good question from a book or homework assignment. You can either (1) think about these operators, and try to understand why they cannot be friend functions, or (2) try a search engine such as Google.

    Comment

    Working...