<<< Other things possible within scope | Index | Static data members >>> |
Increasing the nesting of scopes invites shadowing and makes code harder to understand.
Some partial solutions:
Avoid using global scope whenever possible
Use a naming convention to indicate the scope of variables. For example, class member variable naming convention might be:
class Point { int m_x; // Indicate member with m_ prefix int m_y; //... };
<<< Other things possible within scope | Index | Static data members >>> |