简单功能模仿:
stack:
函数实现
void stack()
{
int stcak[10];
int top=0;
while(top<10)
stack[top++]=top;
while(top>0)
cout<<stack[--top]<<" ";
}
queue:
函数实现
void queue()
{
int queue[10];
int front=0,rear=0;
queue[rear++]=1;
queue[rear++]=2;
while(front<rear)
cout<<queue[front++]<<" " ;
}