【C++】清空一个C++栈的快速方法

来源:https://stackoverflow.com/questions/40201711/how-can-i-clear-a-stack-in-c-efficiently/40201744 传统方法,使用循环: #define elemType int void clearStack(stack<elemType> &s){ while (!s.empty()){
相关文章
相关标签/搜索