——C++的一项特性是在类中嵌套结构或类声明
class Queue { struct Node { Item item; struct Node * next; }; // 在类中嵌套(声明)结构 enum { Q_SIZE = 10 }; // 在类中嵌套(声明)枚举 Node * front; Node * rear; int items; const int qsize; ... public: ... };
原文:https://www.cnblogs.com/suui90/p/13137661.html