1

Possible Duplicate:
Overloading unary operator &

class A
{
public:
    A* operator&()
    {
        return NULL;
    }
};
int main()
{
    A obj;
    A* ptr=&obj;//ptr=NULL
    //determining obj's address here
}

It is possible to determine address of object of such class?

Deduplicator
  • 44,692
  • 7
  • 66
  • 118
eXXXXXXXXXXX2
  • 1,540
  • 1
  • 18
  • 32
  • 1
    [Overloading unary operator &](http://stackoverflow.com/questions/6410333/overloading-unary-operator) – mange Dec 15 '11 at 06:57

0 Answers0