C++ Scope
Go Up to C++ Scope Index
The lexical scoping rules for C++, apart from class scope, follow the general rules for C, with the proviso that C++, unlike C, permits both data and function declarations to appear wherever a statement might appear. The latter flexibility means that care is needed when interpreting such phrases as "enclosing scope" and "point of declaration".