#include <iostream>
using namespace std;
class A
{
public:
int a=3;
};
class B:public A
{
public:
B(){str="Day";}
~B(){delete [] str;}
char *str;
};
int main(void)
{
A *lol=new A;
cout<<lol->a;
B* iop=(B *)lol;
cout<<iop->str;
return 0;
}
Login in to like
Login in to comment