07 2011 档案

摘要:总的来说:size_t 是无符号的整型,int 是 有符号的整型。size_t 是unsigned integer type 的别名,定于与头文件<cstddef>,常用于表示大小和字符长度,在一些函数如sizeof() 或者size()中使用。size_t 中特别定义了一个标识:npos。在一些函数中表示失败的返回值。如在size_t string::find()中,如果没有找到字符串,那么便返回npos。npos的定义:static const size_t npos = -1; 阅读全文
posted @ 2011-07-29 17:23 小卡的土豆园 阅读(6649) 评论(0) 推荐(0)
摘要:查找map<int,int> map_test;map_test.insert(pair<int,int>(1,2));map_test.insert(pair<int,int>(1,3));map_test.insert(pair<int,int>(2,2));int a = map_test[1];int b = map_test[3];map<int,int>::iterator p = map_test.find(4);if(p == map_test.end())b =0;int length = map_test.size 阅读全文
posted @ 2011-07-10 18:28 小卡的土豆园 阅读(339) 评论(0) 推荐(0)
摘要:error c101008a: Failed to save the updated manifest to the file不知为什么,网上查了下只需:在 项目属性-> 清单工具 -> 命令行 -> 附加选项中填写 /validate_manifest LINK : fatal error LNK1168: cannot open Debug/PROGRAM.exe for writing原因是上一次运行该程序框框没关掉或者转成后台运行了。只需要到任务管理器里找到你程序名称对应的.exe进程关闭进程就可以了。 阅读全文
posted @ 2011-07-03 20:22 小卡的土豆园 阅读(198) 评论(0) 推荐(0)