Showing posts with label Class scope. Show all posts
Showing posts with label Class scope. Show all posts

Wednesday, July 8, 2009

Class scope

Class scopeNames declared inside the braces of a class declaration are local to that class. They can be data members or function members. e.g. in
class ScopeExample { int Variable; void Function();};the names Variable and Function are local to the class declaration and can be re-used in another scope. The name ScopeExample, however cannot be re-used in the same scope since it is not between the braces.