pop_back和push_back
时间: 2023-09-01 09:12:37 浏览: 124
push_back和pop_back都是容器vector的操作函数。push_back函数用于在容器末尾插入新的元素,而pop_back函数用于删除容器末尾的元素。具体来说,push_back将一个新元素添加到vector的末尾,而pop_back则将容器末尾的元素删除。使用这两个函数可以方便地进行向vector中添加元素和删除元素的操作。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [020 通过链表学Rust之push_back和pop_back等](https://blog.csdn.net/lcloveyou/article/details/122158348)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [C++中push_back与pop_back的用法](https://blog.csdn.net/qq_32867925/article/details/104851126)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文