I think that I really am confused a bit on objects and what happens when you extend an object.
My goal here is to create B() by extending A() )so that I get all of A()'s functions, etc, but make B() totally self sufficient in creating itself, etc
B(), when instantiated from someplace ends up settings its color, sizing itself, settings its position, etc so that I can do something like:
B::B *b = new B:B(something in);
this -> addChild(b, 1);
So when this->addChild() it then adds and things work how I set in B()
versus:
B::B *b = new B:B(something in);
b->setPosition();
b->setColor();
...
this -> addChild(b, 1);
Is in encapsulation and inheritance?
UPDATE: So I think what is confusing me is that if:
class A : public Z {
}
class b : public Z {
}
In A:
B::B *b = new B::B()
this-> addChild(b,1)
Shouldn't this work?