---------------------------
Microsoft Visual C++ Runtime Library
---------------------------
Debug Assertion Failed!

Program: C:\Windows\SYSTEM32\MSVCP140D.dll
File: d:\program files (x86)\microsoft visual studio 14.0\vc\include\xtree
Line: 238

Expression: map/set iterator not dereferencable

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.

(Press Retry to debug the application)

---------------------------
中止(A) 重试(R) 忽略(I)
---------------------------

int main()
{
//set<string> names;//不写,是默认的二元谓词,区分大小写
set<string,CCompareStringNoCase> names;//不区分大小写,二元谓词可以改变容器的默认的行为
//cout << "hello" << endl;
names.insert("Tina");
names.insert("jim");
names.insert("Jack");
names.insert("Sam");
names.insert("hello");
//set<string>::iterator iNameFound = names.find("Jim");
set<string,CCompareStringNoCase>::iterator iNameFound = names.find("1im");
if (iNameFound != names.end())
{
cout << "找到了。。。" << *iNameFound << endl;
}
else
{
cout << "没找到。。。" << endl;
//cout << "没找到。。。" << *iNameFound << endl;//----------------------------如果没有找到,下标溢出了,就报错咯
}
getchar();
return 0;
}

最新文章

  1. vi 的使用
  2. IDEA tomcat乱码
  3. Functional Programming without Lambda - Part 2 Lifting, Functor, Monad
  4. ROC曲线与AUC值
  5. 卫星轨道和两行数据TLE
  6. 98、EditText 按键盘查询 触发事件
  7. 《OD大数据实战》MapReduce实战
  8. 在Ubuntu上为Android系统编写Linux内核驱动程序(老罗学习笔记1)
  9. echarts-noDataLoadingOption问题
  10. 为什么要重写equals()方法与hashCode()方法
  11. JavaScript平常会跳的坑系列(一)
  12. Windows 安装Django并创建第一个应用
  13. HTML5 文件域+FileReader 分段读取文件并上传(八)-WebSocket
  14. 浅析 MySQL Replication(本文转自网络,非本人所写)
  15. Win32多线程编程(2) — 线程控制
  16. poj2492 A Bug&#39;s Life【基础种类并查集】
  17. 用css实现3D立方体旋转特效
  18. SQL SERVER Buffer Pool扩展
  19. 大数据学习之HDFS基本API操作(下)06
  20. zabbix 添加自动发现端口并监控

热门文章

  1. CentOS下搭建Git服务器
  2. byte值的问题
  3. 获取cookie里面的sessionid
  4. [SD.TEAM语录]AC语录
  5. C#线程 使用线程
  6. 如何在Spring Boot应用启动之后立刻执行一段逻辑
  7. 重装ArchLinux后修改GRUB配置不生效问题的解决
  8. ASP.NET实现一个在线音乐统计网站(歌手,音乐,角色……增删改查)
  9. Java实现 LeetCode 587 安装栅栏(图算法转换成数学问题)
  10. Java实现 LeetCode 560 和为K的子数组(某著名排序大法改编)