See More

/* Time 2014-4-20 ÄÏÑóÀí¹¤£ºÀ¨ºÅÅä¶ÔÎÊÌ⣨2£© Õ»µÄÊý×éʵÏÖ·½·¨ author Light E-mail [email protected] ³ÌÐòÔÚ×·¼Ó¿Õ¼äµÄʱºò»á³öÏÖÎÊÌâ */ #include #include typedef int StackElement; class Stack { public: Stack(); Stack(const Stack &original); ~Stack(); void Push(const StackElement &value); StackElement Top() const; const Stack &operator=(const Stack &rightHandSide); private: class Node { public: StackElement data; Node *next; // Node ÀàµÄ¹¹Ô캯Êý Node(StackElement value, Node *link = 0):data(value), next(link) { //empty } }; typedef Node *NodePtr; NodePtr myTop; }; int main(void) { cout << "Hello World!\n"; return 0; }