How do I call the parent function from a derived class using C++? For example, I have a class called parent, and a class called child which is deri
parent
child
struct a{ int x; struct son{ a* _parent; void test(){ _parent->x=1; //success } }_son; }_a; int main(){ _a._son._parent=&_a; _a._son.test(); }
Reference example.