|
|
OO - Another Perspective |
|
Another way to look at it is an issue of contexts. This is not usually explicitly discussed in OO texts.
A C function can see variables that are in the following scopes:
A C++ class method can see variables that are in the following scopes:
A C++ instance method can see variables that are in the following scopes:
So at some level classes and instances just let a programmer create groups of variables that can be carted around together and be seen by functions that will use them.