?? stack.cpp
字號:
/*------------------------------------------------------------------------*/
/* */
/* STACK.CPP */
/* */
/* Copyright Borland International 1991 */
/* All Rights Reserved */
/* */
/*------------------------------------------------------------------------*/
#if !defined( __STACK_H )
#include <Stack.h>
#endif // __STACK_H
#ifndef __IOSTREAM_H
#include <iostream.h>
#endif
void Stack::push( Object& toPush )
{
theStack.add( toPush );
itemsInContainer++;
}
Object& Stack::pop()
{
Object& temp = theStack.peekHead();
theStack.detach( temp );
if( temp != NOOBJECT )
itemsInContainer--;
return temp;
}
ContainerIterator& Stack::initIterator() const
{
return *( (ContainerIterator *)new ListIterator( this->theStack ) );
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -