| <<< | Index | >>> |
Increasing the nesting of scopes invites shadowing
(and also makes code harder to understand).
Some partial solutions:
Avoid using global scope when possible;
Use a naming convention to indicate the scope of variables;
Also note class member naming convention:
class Point
{
int m_x; // Indicate member with m_ prefix
int m_y;
//...
};
| <<< | Index | >>> |