program files (x86)\microsoft visual studio 14.0\vc\include\xtree,如果没有找到,下标溢出了,就报错咯
---------------------------
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;
}
最新文章
- vi 的使用
- IDEA tomcat乱码
- Functional Programming without Lambda - Part 2 Lifting, Functor, Monad
- ROC曲线与AUC值
- 卫星轨道和两行数据TLE
- 98、EditText 按键盘查询 触发事件
- 《OD大数据实战》MapReduce实战
- 在Ubuntu上为Android系统编写Linux内核驱动程序(老罗学习笔记1)
- echarts-noDataLoadingOption问题
- 为什么要重写equals()方法与hashCode()方法
- JavaScript平常会跳的坑系列(一)
- Windows 安装Django并创建第一个应用
- HTML5 文件域+FileReader 分段读取文件并上传(八)-WebSocket
- 浅析 MySQL Replication(本文转自网络,非本人所写)
- Win32多线程编程(2) — 线程控制
- poj2492 A Bug&#39;s Life【基础种类并查集】
- 用css实现3D立方体旋转特效
- SQL SERVER Buffer Pool扩展
- 大数据学习之HDFS基本API操作(下)06
- zabbix 添加自动发现端口并监控