int main() { stack<int> test; //插入 test.push(1); test.push(2); test.push(3); //删除 test.pop(); cout << test.size() << endl; while (!test.empty()){//清空栈 test.pop(); } return 0; }