C++ Concept Map

Class scope

Names 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.


Please mail any corrections and/or suggestions to Roger Hartley at
rth@cs.nmsu.edu

Copyright © 2003 Roger Hartley