D
dost
please see the following code.
class A
{
public:
virtual void F1(){printf("\nclass A :: F1() ");}
};
class B : public A
{
public:
virtual void F2(){printf("\nclass B :: F1() ");}
};
int _tmain(int argc, _TCHAR* argv[])
{
A *pA = new A(); //
B *pB = new B(); // Question A
}
Hi
In the above code i was looking for virtual table pointer values on
both statement.
1 A *pA = new A(); here i see when object is created a new vptr is
created and it has the address in static array for function A ::
F1().
2. B *pB = new B(); here i see the vptr address is different which is
obvious and the address and entry of A :: F1(). But i cant see the
entry of function B :: F2().
thank you
class A
{
public:
virtual void F1(){printf("\nclass A :: F1() ");}
};
class B : public A
{
public:
virtual void F2(){printf("\nclass B :: F1() ");}
};
int _tmain(int argc, _TCHAR* argv[])
{
A *pA = new A(); //
B *pB = new B(); // Question A
}
Hi
In the above code i was looking for virtual table pointer values on
both statement.
1 A *pA = new A(); here i see when object is created a new vptr is
created and it has the address in static array for function A ::
F1().
2. B *pB = new B(); here i see the vptr address is different which is
obvious and the address and entry of A :: F1(). But i cant see the
entry of function B :: F2().
thank you