Nested Classes[edit --wrong terminology] I mean nested Class Objects
I haven't been able to find an answer to this. When you declare a class instance inside another class it has access to all that classes member variables. Now if you have functions for the nested class that work on these member variables you don't have to pass them through the parameter list for the function right? But if you don't pass them through the parameter list then this nested class is no longer discrete. Any changes you make will disrupt both classes. And you can't really use that class as a stand alone class. I would think that if the nested class acts on the variables directly it would be faster then if it had to have the variables passed through the parameter list. Does anyone know if is is in fact faster or does the compiler optimize this away so it really makes no difference or the difference would be negligable.
Sorry for the mixup i was reading another webiste talking about nesting a class declaration within another class.