项目中的一个小bug。主观性认为 std::list 作为函数参数,是按指针传递的,实际还是按值传递的(不解!!)。 举例如下
1 #include <iostream>
2 #include <list>
3
4 using namespace std;
7 /*version 1: transfer pointer of list */
8 /*
9 void update(list<int>* b){
10
项目中的一个小bug。主观性认为 std::list 作为函数参数,是按指针传递的,实际还是按值传递的(不解!!)。 举例如下
1 #include <iostream>
2 #include <list>
3
4 using namespace std;
7 /*version 1: transfer pointer of list */
8 /*
9 void update(list<int>* b){
10