Im trying to link one display to another display using c++. For instance
void funcA(){
Display greenScreen; 
Display redScreen;
greenScreen.setChild(redScreen); 
}
Here's the class implementation:
class display{
public:
display* child = nullptr; 
void setChild(display);
}
Implementation of setChild:
void setChild(display childnode){
child = &childnode; 
}
I thought this would work, but when i tried to retrieve greenScreen's child, my app crashed. Any help would be greatly appreciated!
 
    