Type Names in Class Scope

Type names defined within class scope are considered local to their class. They cannot be used outside that class. The following example demonstrates this concept:

class Tree
{
public:
   typedef Tree * PTREE;
   PTREE  Left;
   PTREE  Right;
   void  *vData;
};

PTREE pTree;  // Error: not in class scope.