【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()){
相關文章
相關標籤/搜索