| <<< Scope of variables | Index | Scope pitfalls >>> |
Define items inside class scope:
class Point
{
public:
typedef int coordinate;
enum quadrant { FIRST, SECOND, THIRD, FOURTH };
class inner_drawing { ... };
//...
};
Using items defined within class scope:
Point::coordinate coord = 4;
Point::quadrant q1 = Point::FIRST;
Point::inner_drawing idraw;
| <<< Scope of variables | Index | Scope pitfalls >>> |