Page 1 of 1

I don´t know how to get the adress of the class inside itsel

Posted: Sun Aug 24, 2003 11:00 pm
by Adek336
How can I tell what adress is this specific instance of the class?

class foo
{
public:
long bar();
};

long foo::bar()
{
return SOME_MAGIC_OPERATOR;
}

foo my_foo;

and my_foo.bar() would return &my_foo. Is this possible?

Cheers,
Adrian.

RE:I don´t know how to get the adress of the class inside it

Posted: Sun Aug 24, 2003 11:00 pm
by Jamethiel
Well, let's see...

It's going to be one of myself, Me, self, or this. Probably the latter.

Enjoy.

RE:I don´t know how to get the adress of the class inside it

Posted: Sun Aug 24, 2003 11:00 pm
by Adek336
it is ´this´! I misunderstood a tutorial and I thought ´this´ points at the method which accesses it.

Thanx,
Adrian