The overall problem is and double enlaced tree, in other words, parent has pointer to child and viceverse.
#include <iostream>
using namespace std ;
class Branch ;
class Tip
Type: Posts; User: edwrodrig
The overall problem is and double enlaced tree, in other words, parent has pointer to child and viceverse.
#include <iostream>
using namespace std ;
class Branch ;
class Tip
Then the definiton of protected as "derived class can access to protected member of it's superclass" is incomplete because that only works if both are the same instance of the classes.
The problem...
but _x isn't a private member, is a protected one, and B is a subclass of A.
I know that protected member of a class can be accessed by subclasses of the previous class.
But I have a problem when I compile this code
#include <iostream>
using namespace std ;
class...