Instead of having private class members as private (which is default), consider having them protected. That allows derived classes to access the protected members.
Yes of course you can use it and agreed buffbill it breaks encapsulation but it can be used to advantage in certain cases where in only a particular derived class needs to be given the access to base class private members.
And PkD do correct the syntax errors before using the code above and also use proper indentation.