Advertisement
Guest User

qqq

a guest
Mar 28th, 2015
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. void IntegerListStackPush ( IntegerListStack & _stack, IntegerList _list )
  2. {
  3. if(_stack.m_nUsed == _stack.m_nAllocated)
  4. {
  5. std::cout << "Stack is full.";
  6. return;
  7. }
  8. else
  9. {
  10. IntegerList::Node *pCurrent = _list.m_pFirst;
  11. IntegerList::Node *pBuf = _stack.m_Array[ _stack.m_nUsed++ ].m_pFirst;
  12. while(pCurrent)
  13. {
  14. pBuf->m_value = pCurrent->m_value;
  15. IntegerList::Node *smth;
  16. pBuf->m_pNext = smth;
  17. pCurrent = pCurrent->m_pNext;
  18. }
  19.  
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement