typedef list<string> circuitlist;
circuitlist::iterator tempp;比如说tempp已经指向了一个位置,我想在这个位置前面插入数据,
用CL.insert(tempp,"asdfsdf");
但是我如果想在tempp后面插入数据,同时不改变tempp的值,也就是tempp的位置呢?
circuitlist::iterator tempp;比如说tempp已经指向了一个位置,我想在这个位置前面插入数据,
用CL.insert(tempp,"asdfsdf");
但是我如果想在tempp后面插入数据,同时不改变tempp的值,也就是tempp的位置呢?
这样不可以吗? CL.insert(tempp+1 , "backoftempp");
还有啊,怎么在list里面搜索我想要得值在什么位置呢?
楼主不如这样:
CL.push_back("asdfsdf");
然后:
CL.push_back("backofasdfsdf");
CL.push_back("asdfsdf");
else
CL.Insert(tempp,"asdfsdf");