定义两个栈分别为 A,B;
void enQueue(ELEMTYPE e) { A.push(e); }
ELEMTYPE deQueue(ELEMTYPE e) { if(B.isEmpty()) { while(A.isEmpty()==false) { B.push(A.pop()); } } return B.pop(); }