Hi All,
Private data in a class can only be accessed by getter functions. If I have a class as the private data in another class, in another class...Example:
class Top
{
private:
class Middle
{
private:
class Bottom
{
private:
int number;
}
}
}
If I want to access the int number, I would call 3 getter functions. Is there a better way to do this other than reconstructuring? Sorry if this is too 'beginner'...
Also any good reads on nested classes are welcome. Thanks