Leehm

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

04 2019 档案

摘要:1. 往map里面插入元素: 下标方式[]: map[key] = value; 调用insert: map.insert(make_pair(key, value)); 下标方式是通过重载[]操作符来实现的,它直接进行插入或覆盖, 而insert方法会判断是否存在相同的key,如果存在则直接返回, 阅读全文
posted @ 2019-04-10 11:51 Leehm 阅读(1311) 评论(0) 推荐(0)