摘要:
以前我以为入栈和出栈后的顺序一定变反。那那么如何让顺序保持不变呢?如0,1,2,3进栈,那么如何让出栈后的顺序还是0,1,2,3?#include<stack>#include<iostream>using namespace std;void main(){stack<int> s;s.push(0);cout<<s.top()<<endl;s.pop();s.push(1);cout<<s.top()<<endl;s.pop();s.push(2);cout<<s.top()<<en 阅读全文
posted @ 2011-09-08 17:02
清晨の雨露
阅读(343)
评论(0)
推荐(0)

浙公网安备 33010602011771号