How do I get the address of an object after overloading the & operator?
Posted on 2000-04-18
If I have a class where I overload the & operator to do something other than return a pointer to the instance of the object, how could I then actually get the address of that object in code? And can it be done without any nasty type casting (which is the only way I could think of doing it).
For the interested, I was playing with the CComPtr object in Visual C++ and I was wondering how to get the address of the CCOmPtr object rather than the interface pointer. I know there is no real reason to do that, I just wondered if and how it could be done.