C++遍历list并删除_gezigezao的博客-CSDN博客//初始化一个int的liststd::list<int> intList;for(int i = 0;i<=3;i++) intList.pushback(i); //使用pushback向List加内容std::list<int>::iterator itor;//声明一个Int的List的迭代器for(itor = intList.begin();itor != intList.end();itor++)itor = intList.erase(ithttps://blog.csdn.net/gezigezao/article/details/106026418