STL教程:http://c.biancheng.net/stl/stl_basic/
http://c.biancheng.net/view/6892.html
- 遍历
如果泛型不是基本数据类型,使用Iterator会报错,要用下面的方式遍历:for (int i : lst) { cout << i << " "; }
STL教程:http://c.biancheng.net/stl/stl_basic/
http://c.biancheng.net/view/6892.html
for (int i : lst) {
cout << i << " ";
}
0 条评论