原理 栈是一种先进后出的数据结构 插入3,2,1时 321 删除栈顶时 出栈顺序为 123 代码 代码复制stack<type> stk;//定义栈 stk.push();//插入 stk.pop();//删除 stk.size();//大小