首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

关于std 地图的插入和删除

2013-01-23 
关于std map的插入和删除关于代码里map的删除,有一点困惑:在删除前用iterator保存位置,对map进行插入或删

关于std map的插入和删除

关于代码里map的删除,有一点困惑:

在删除前用iterator保存位置,对map进行插入或删除后,iterator是否有效.

看完标准后释然,直接上标准:
23.1.2.8:The insert members shall not affect the validity of iterators and references to the container, and the erase members shall invalidate only iterators and references to the erased elements.

?

热点排行