Hi, i have this smal program
int Dummy() {}
Class Cat
{
public:
Cat(){}
int GetAge(){return MyAge;}
private:
int MyAge;
}
int main
{
int (Cat::*p1() = Cat::GetAge;
int (*p2) = Dummy;
cout << p1 << endl;
cout << p2 << endl;
}
"cout << p2" print the adress of Dummy function but "cout << p1:" doesnt.
What i want is : priting the address of GetAge function.
How can i do that?
Thanks a lot
Jimmy
mailto:nhan_tiags@yahoo.com
int Dummy() {}
Class Cat
{
public:
Cat(){}
int GetAge(){return MyAge;}
private:
int MyAge;
}
int main
{
int (Cat::*p1() = Cat::GetAge;
int (*p2) = Dummy;
cout << p1 << endl;
cout << p2 << endl;
}
"cout << p2" print the adress of Dummy function but "cout << p1:" doesnt.
What i want is : priting the address of GetAge function.
How can i do that?
Thanks a lot
Jimmy
mailto:nhan_tiags@yahoo.com