6、)+1; } int GetLeftDistance() { return m_pLeft!=0?m_pLeft->m_iDistance:-1; } int GetRightDistance() { return m_pRight!=0?m_pRight->m_iDistance:-1; } int m_iData; int m_iDistance; TreeNode* m_pLeft; TreeNode* m_pRight;};// Stack
7、//////////////////////////////////////////////////////////////////////////class Stack{public: Stack(int iAmount = 10); ~Stack(); //return 1 means succeeded, 0 means failed. int Pop(TreeNode* & val); int Push(TreeNode* val); int Top(TreeNode* & val);
8、 //iterator int GetTop(TreeNode* &val); int GetNext(TreeNode* &val);private: