标签:des blog div c log ad r as tt
struct ListNode { int m_nKey; ListNode *m_pNext; }; void printListReversingly(ListNode *pHead) { stack<ListNode*> nodes; ListNode *pNode = pHead; while (pNode != NULL) { nodes.push(pNode); pNode = pNode->m_pNext; } while (!nodes.empty()) { pNode = nodes.top(); printf("%d\t", pNode->m_nKey); nodes.pop(); } }
标签:des blog div c log ad r as tt
原文地址:http://www.cnblogs.com/baisu/p/3994163.html