1、

#include <windows.h>

//使用map时会出现如下警告:主要意思是 identifier was truncated to '255' characters in the browser information,可以通过增加#pragma warning(disable:4786)消除该警告。该警告主要意思是调试信息的字符超过了255个,将会被截断不现实,并不影响程序运行。
#pragma warning(disable:4786)// ZC: 这个还要放在 "#include <map>"的前面 #include <map>
using namespace std; void main()
{
map<DWORD, int> map1;
int i = map1[];
printf("i : %d\n", i);
map1[] = i + ;
i = map1[];
printf("i : %d\n", i); map1.erase();// ZC: 直接通过 key来删除
i = map1[];
printf("i : %d\n", i);
}

2、VC6 控制台输出:

i : 0
i : 100
i : 0
Press any key to continue

3、

4、

5、

最新文章

  1. SpringMVC常用配置-处理程序异常以及404错误
  2. 使用WebDriverWait类处理等待(sleep)的问题
  3. The Genymotion Virtual device could not obtain an IP address解决办法
  4. 快速向表中插入大量数据Oracle中append与Nologging
  5. jenkins配置记录(2)--代码发布流程
  6. Android(java)学习笔记112:局部位置的内部类的介绍
  7. php微信支付(仅pc端扫码支付模式二)详细步骤.----仅适合第一次做微信开发的程序员
  8. HUOJ-10857 最大的面积 凸包+DP
  9. ef6 dbfirst 实现同一套代码多个数据库访问
  10. 六款值得推荐的android(安卓)开源框架简介【转】
  11. Google测试精华文章(1) - 测试行为,而非实现
  12. LINQ 图解 LINQ学习第三篇 [转]
  13. 【tyvj1463】智商问题 [分块][二分查找]
  14. linux权限归属及特殊权限设置
  15. [LeetCode] Continuous Subarray Sum 连续的子数组之和
  16. [debian]use ISO as debian apt source / 使用ISO文件作为apt源
  17. 【记录】Windows 操作系统常用快捷命令
  18. java面试题整理(3)
  19. LeetCode 461 Hamming Distance 解题报告
  20. 【九校联考-24凉心模拟】锻造(forging)

热门文章

  1. Kattis之旅——Prime Reduction
  2. No module named scrapy 成功安装scrapy,却无法import的解决方法
  3. inst_for_mysql5.7.sh
  4. mysql优化之使用iotop+pt-ioprofile定位具体top io文件
  5. bzoj 4591 超能粒子炮&#183;改 - Lucas
  6. 【python002-设计小游戏】
  7. Base64编码为什么会使数据量变大?
  8. iOS开发 -------- UITableView的编辑
  9. CentOS7使用命令连接网络配置
  10. 4. 多重背包问题 I