大约有 2,000 项符合查询结果(耗时:0.0043秒) [XML]

https://www.tsingfun.com/it/cpp/1362.html 

VS2005中SetUnhandledExceptionFilter函数应用 - C/C++ - 清泛网 - 专注C/C++及内核技术

...所以应用程序捕获不到那些异常,原因是因为新版本的CRT实现在异常处理中强制删除所有应用程序先前设置的捕获函数,如下所示: /* Make sure any filter already in place is deleted. */ SetUnhandledExceptionFilter(NULL); UnhandledExceptionFilter(&...
https://www.tsingfun.com/it/cpp/1365.html 

由“Pure Virtual Function Called” 考虑到的 - C/C++ - 清泛网 - 专注C/C++及内核技术

...用虚函数。但实际上可能不是这样子,这取决于编译器的实现。VS2005就不是,直接调用会静态绑定,而间接调用是动态绑定。 如果是小程序的话,这种错误很容易发现,如果工程大了,这样的错误非常难找到。所以,书里的建...
https://www.tsingfun.com/it/cpp/1372.html 

Boost智能指针——shared_ptr - C/C++ - 清泛网 - 专注C/C++及内核技术

...象的内存才被自动释放。在共享对象的访问权限同时,也实现了其内存的自动管理。 boost::shared_ptr的内存管理机制: boost::shared_ptr的管理机制其实并不复杂,就是对所管理的对象进行了引用计数,当新增一个boost::shared_ptr对该...
https://www.tsingfun.com/it/cpp/1383.html 

C++ 线程安全的单例模式 - C/C++ - 清泛网 - 专注C/C++及内核技术

... { if(NULL == m_instance) { Lock();//借用其它类来实现,如boost if(NULL == m_instance) { m_instance = new Singleton; } UnLock(); } return m_instance; } 2、内部静态实例的懒汉模式 这里需要注意...
https://www.tsingfun.com/it/cpp/1425.html 

VC 对话框背景颜色、控件颜色 - C/C++ - 清泛网 - 专注C/C++及内核技术

... 方法一 (失效):调用CWinApp类的成员函数SetDialogBkColor来实现。 其中函数的第一个参数指定了背景颜色,第二个参数指定了文本颜色。下面的例子是将应用程序对 话框设置为蓝色背景和红色文本,步骤如下: ① 新...
https://www.tsingfun.com/it/cpp/1434.html 

stl 字符串std::string作为std::map主键key的实例 - C/C++ - 清泛网 - 专注C/C++及内核技术

...个实例介绍std::map字符串作为key的常见用法,并使用find_if实现map按value值查找。代码如下: #include <map> #include <string> #include <algorithm> using namespace std; class map_value_finder { public: map_value_finder(const std::string &cmp_string):m_s_cmp_...
https://www.tsingfun.com/it/cpp/1435.html 

std::find,std::find_if使用小结 - C/C++ - 清泛网 - 专注C/C++及内核技术

...类/结构体呢? 来个稍复杂点的例子,其他的可以类推,实现功能如下: 产品、账号多对多的关系,通过产品找到对应的账号列表。 #include <vector> #include <algorithm> #include <string> using namespace std; typedef struct _ProductAccount { ...
https://www.tsingfun.com/it/cpp/1519.html 

高效使用STL容器小tip - C/C++ - 清泛网 - 专注C/C++及内核技术

...empty() 都是常数时间操作,只返回size是否为0,所以常被实现为inline函数。高效使用 STL容器
https://www.tsingfun.com/it/cpp/1563.html 

mfc spin control 用法 - C/C++ - 清泛网 - 专注C/C++及内核技术

...sult = 0; } 简便的方法可以在资源文件中设置Spin的属性,实现控制Edit控件数字的增减,详见:https://www.tsingfun.com/it/cpp/1564.html。mfc spin
https://www.tsingfun.com/it/cpp/1570.html 

一款IP:端口监控工具 服务器端口监控工具[附源码] - C/C++ - 清泛网 - 专注...

...:TradeMonitor.zip 主要代码请参考:《mfc telnet 端口,代码实现、不调用telnet.exe》 表格采用GridCtrl(Demo源码):《MFC Grid control 2.27》 端口监控 工具 源码