dimanche 28 juin 2020

Print all inherited class member variables and methods

Suppose I have inheritance like below:

class A
{
public:
A(){}
int s;
void Show(){}
};

class B : public A
{
public:
B(){}
int y;
void MyShow() {}
};

int main()
{
B b;
}

Is there a way that I can know by any mechanism [runtime/debug] etc that what are the member variables / methods of object 'b' - I mean complete list along with all it inherited?

Aucun commentaire:

Enregistrer un commentaire