Hi there,
I have a class within a class. How do I create an object of the sub class and then use it.
eg)
Code:class setA { protected: int Weight; string Name; void SetWeight(int Weight_in) { Weight = Weight_in; } void SetName(string Name_in) { Name = Name_in; } public: class part1 { protected: int DescentRate; double MaxHeight; void SetDescentRate(int DescentRate_in) { DescentRate = DescentRate_in; } void SetMaxHeight(double MaxHeight_in) { MaxHeight = MaxHeight_in; } }; };
How could I access and hence use setdescentrate() in the main???
Thanks



LinkBack URL
About LinkBacks




art1::SetDescentRate' : cannot access protected member declared in class 'SetA: