上一页 1 ··· 38 39 40 41 42 43 44 45 46 ··· 63 下一页
摘要: 理解weak_ptr 的2个关键点: 1. 认为它和一般指针没有区别。 2. 没有删除它能访问的动态分配的空间的能力。 weak_ptr是对shared_ptr的一个访问者,weak_ptr不参与shared_ptr的引用计数,也不会删除所指向的对象。同时,当对象被shared_ptr删除后,weak_ptr就是无效的了。 使用weak_ptr,而不使用T*这样的c++指针的原因是:weak_... 阅读全文
posted @ 2008-09-01 23:29 能巴 阅读(527) 评论(0) 推荐(0)
摘要: 基本上,主要就是: 1. Shared_ptr instead of new ,, very good replacement. 2. Regex 阅读全文
posted @ 2008-09-01 22:55 能巴 阅读(223) 评论(0) 推荐(0)
摘要: [转载自:http://blog.csdn.net/fmddlmyy/archive/2005/06/21/399661.aspx] 写这篇文章的起因是这么一个问题:我们在使用和安装Windows程序时,有时会看到以“2052”、“1033”这些数字为名的文件夹,这些数字似乎和字符集有关,但它们究竟是什么意思呢? 研究这个问题的同时,又会遇到其它问题。我们会谈到Windows的内部架构、Win32... 阅读全文
posted @ 2008-08-31 22:48 能巴 阅读(1001) 评论(0) 推荐(0)
摘要: [转载自: http://blog.csdn.net/fmddlmyy/archive/2007/02/14/1510193.aspx] 3 字符编码模型 程序员经常会面对复杂的问题,而降低复杂性的最简单的方法就是分而治之。Peter Constable在他的文章"Character set encoding basics Understanding character set encodings... 阅读全文
posted @ 2008-08-31 22:12 能巴 阅读(1030) 评论(0) 推荐(0)
摘要: [转载自:http://blog.csdn.net/fmddlmyy/archive/2007/02/14/1510189.aspx] 我曾经写过一篇《谈谈Unicode编码,简要解释UCS、UTF、BMP、BOM等名词》(以 下简称《谈谈Unicode编码》),在网上流传较广,我也收到不少朋友的反馈。本文探讨《谈谈Unicode编码》中未介绍或介绍较少的代码页、 Surrogates等问题,补充... 阅读全文
posted @ 2008-08-31 21:48 能巴 阅读(1038) 评论(0) 推荐(0)
摘要: DWMAPI.DLL is a vista only dll, but it will be wanted in some cases on non-Vista OS. It seems a MS bug. Haha. “Now that vista is out, can you please fix the MAJOR bug that causes IE7 to kill any n... 阅读全文
posted @ 2008-08-29 17:31 能巴 阅读(689) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2008-08-23 17:22 能巴 阅读(137) 评论(0) 推荐(0)
摘要: double a = 99.012345678912351; double b = 99.012345678912352; bool bEqual = a == b; /*TRUE*/ a == b: 使用double类型默认精度来比。 |a-b| < MINVAL: 我们指定精度来比。 都行。看情况来定用哪种。 阅读全文
posted @ 2008-08-18 22:37 能巴 阅读(1133) 评论(1) 推荐(0)
摘要: 具有动态的分配和释放内存的能力是C/C++程序语言的重要特色之一。VisualC++ debugger和CRT库提供了一系列有效的检测和鉴定内存泄漏的工具。 设置内存泄漏检测 检测内存泄漏的基本工具是调试器和CRT调试堆函数。为了使用调试堆函数,在你的程序中你必须含有下面的说明: #define _CRTDBG_MAP_ALLOC #include... 阅读全文
posted @ 2008-08-13 23:25 能巴 阅读(434) 评论(0) 推荐(0)
摘要: 1. Use _CrtDumpMemoryLeaks() to check whether there is memory leak in program. With the help of _CRTDBG_MAP_ALLOC, it can output memory leak info with file line info for those memory block allocat... 阅读全文
posted @ 2008-08-13 23:21 能巴 阅读(412) 评论(0) 推荐(0)
上一页 1 ··· 38 39 40 41 42 43 44 45 46 ··· 63 下一页