For example there is a chain
class A
{
int a;
int b;
public:
A();
};
class B: public A
{
int c;
char b;
public:
B()
};
In ordinary way to to create an object of the derived class we can use this form
A* ptr = new B()
How to do the same using malloc ?
Aucun commentaire:
Enregistrer un commentaire