Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void IntegerListStackPush ( IntegerListStack & _stack, IntegerList _list )
- {
- if(_stack.m_nUsed == _stack.m_nAllocated)
- {
- std::cout << "Stack is full.";
- return;
- }
- else
- {
- IntegerList::Node *pCurrent = _list.m_pFirst;
- IntegerList::Node *pBuf = _stack.m_Array[ _stack.m_nUsed++ ].m_pFirst;
- while(pCurrent)
- {
- pBuf->m_value = pCurrent->m_value;
- IntegerList::Node *smth;
- pBuf->m_pNext = smth;
- pCurrent = pCurrent->m_pNext;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement