元素为int型
typedef struct
{
int data[Max];
int front,rear;
}SqQueue;
typedef struct
{
int data[Max];
int top;
}SqStack;
void function(SqStack &S)
{
SqQueue Q;
InitQueue(Q);
int t;
if(S==NULL||S.top=-1)
return;
while(!Empty(S))
{
Pop(S,t);
EnQueue(Q,t);
}
while(!Empty(Q))
{
DeQueue(Q,t);
Push(S,t);
}
}