zcy 2021-06-09 23:12:26 +08:00
commit 12e30ddea4
1 changed files with 6 additions and 0 deletions

View File

@ -33,6 +33,12 @@ int main(){
list<int>::iterator pos = (find(i.begin(), i.end(), 4));
i.insert(pos,1);
auto begin = i.begin();
while(*begin != 4)
begin++;
i.erase(begin);
for(auto x : i){
std::cout<<x<<"\r\n"<<std::endl;
}