End Google Ads 201810 - BS.net 01 --> Hi
I have one C++ question. I designed two classes like:
class A
{
...
virtual void funt(){};
...
}
class B : public class A
{
...
void funt();
...
}
I did following:
A* pClassA = new B();
pClassA->funt();
Should class B's funct() called or class A's?
I want the class B' funct() to be called. But it did not get called. I don't want to use "dynamic_cast".
What is wrong?
Best regards,
مواقع النشر (المفضلة)