65,208
社区成员
发帖
与我相关
我的任务
分享++lst.begin();
对没有任何影响。
#include <list>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
list<double> lst;
lst.push_back(1.1);
lst.push_back(2.2);
lst.push_back(3.3);
cout << "lst: ";
// 遍历
list<double>::iterator it;
for(it = lst.begin(); it != lst.end(); it++)
cout << *it << " ";
cout << endl;
return 0;
}