Link to home
Start Free TrialLog in
Avatar of daohailam
daohailamFlag for United States of America

asked on

Overload operator ?

How to overload "->", "->*" operator ? (UNIX g++)
Avatar of thresher_shark
thresher_shark

Um, the same way you do with any other operator. :-)

Do you know anything about operator overloading?
Avatar of daohailam

ASKER

Edited text of question
ASKER CERTIFIED SOLUTION
Avatar of yonat
yonat

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
this is my case:

template<class T>
class foo
{
private:
      T* t;
public:
      T* operator ->()
      {
            return( t );
      }
};

thanks !
The operator "->*" can implemented the same as "->"