<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[netguang的专栏]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/netguang</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; netguang]]></copyright><item><title><![CDATA[C++ 调试时 ：“Run-Time Check Failture #0”的解决方法]]></title><link>https://blog.csdn.net/netguang/article/details/103264565</link><guid>https://blog.csdn.net/netguang/article/details/103264565</guid><author>netguang</author><pubDate>Tue, 26 Nov 2019 21:44:07 +0800</pubDate><description><![CDATA[问题描述：

   程序在调试时，弹出如下对话框：

  

原因分析： 这个属于典型的调用约定问题引起

检查点：

       1. 动态库工程中，要设置下调用方式，如VS2008工程，点击【项目】-&gt;【属性】-&gt;【配置属性】-&gt;【C/C++】-&gt;【高级】-&gt;【调用约定】 有__cdecl (/Gd)、__fastcall ...]]></description><category></category></item><item><title><![CDATA[C++宏定义编译不通过快速排查方法（VS编译器）]]></title><link>https://blog.csdn.net/netguang/article/details/100023854</link><guid>https://blog.csdn.net/netguang/article/details/100023854</guid><author>netguang</author><pubDate>Thu, 22 Aug 2019 20:46:10 +0800</pubDate><description><![CDATA[在定义比较复杂的宏时，往往因为编码的疏忽，在程序编译时，抛出各种错误，查找起来非常耗时，

比如：

比如定义一个宏

#define PRINT_OUTPUT() \

HRESULT hr = TestResult(); \

if(0 != hr) \

{ \

cout &lt;&lt; "error" &lt;&lt; endl; \

} \ 

编译会报错：

正在编译...
...]]></description><category></category></item><item><title><![CDATA[注册表中设置页面打印参数]]></title><link>https://blog.csdn.net/netguang/article/details/97827312</link><guid>https://blog.csdn.net/netguang/article/details/97827312</guid><author>netguang</author><pubDate>Tue, 30 Jul 2019 22:52:43 +0800</pubDate><description><![CDATA[网页文件，可以通过【文件】-&gt;【页面设置】，并修改相应的参数，就可实现打印格式的调整，如下图



但是如何通过程序实现，根据打印的需要，动态设置这些参数。可以通过操作注册表，达到同样的效果，

因为这些注册表项与上图的设置是对应的，如下：

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup]

"header...]]></description><category></category></item><item><title><![CDATA[C++ 判断窗口句柄是否有效的函数]]></title><link>https://blog.csdn.net/netguang/article/details/90606315</link><guid>https://blog.csdn.net/netguang/article/details/90606315</guid><author>netguang</author><pubDate>Mon, 27 May 2019 17:02:37 +0800</pubDate><description><![CDATA[IsWindow 函数

The IsWindow function determines whether the specified window handle identifies an existing window.

Parameters

hWnd

[in] Handle to the window to test.

Return Values

If the window han...]]></description><category></category></item><item><title><![CDATA[Linux 上实现双向进程间通信管道]]></title><link>https://blog.csdn.net/netguang/article/details/90213830</link><guid>https://blog.csdn.net/netguang/article/details/90213830</guid><author>netguang</author><pubDate>Tue, 14 May 2019 20:10:22 +0800</pubDate><description><![CDATA[技术要点：

1. 使用命名管道，实现进程间管道的访问

2. 管道操作使用长连接

3. 使用信号量共享key实现进程锁

 Linux管道是单向的，要实现进程间双向通讯，需要使用两个管道：一个负责Client发送数据到server，另一个负责server返回数据到Client；对于一个client访问server的情况（相当于一个进程访问server）,Client发送与接收数据不会...]]></description><category></category></item><item><title><![CDATA[C++ 类为什么不返回类型？ （学习笔记）]]></title><link>https://blog.csdn.net/netguang/article/details/90049743</link><guid>https://blog.csdn.net/netguang/article/details/90049743</guid><author>netguang</author><pubDate>Thu, 09 May 2019 22:57:33 +0800</pubDate><description><![CDATA[1）构造函数只能在程序诞生的时候调用，不能在其他时候调用，

 有返回值，就意味着有选择权，即使返回的是void，程序也可以随意调用构造函数，这样就威胁到程序的安全性

2）降低编译器的复杂度

如果有返回值，那么编译器就不能不去做如何处理

3）设置返回值，会造成程序的二义性

 例如： void fun(int a); (1)

 void...]]></description><category></category></item><item><title><![CDATA[为什么构造函数不能使用virtual关键字修饰？（学习笔记）]]></title><link>https://blog.csdn.net/netguang/article/details/90049558</link><guid>https://blog.csdn.net/netguang/article/details/90049558</guid><author>netguang</author><pubDate>Thu, 09 May 2019 22:44:22 +0800</pubDate><description><![CDATA[构造函数是用来创建一个新的对象，而虚函数的运行是建立在对象的基础上，在构造函数执行时，对象尚未形成，所以不能将构造函数定义为虚函数，通常析构函数才会用virtual修饰（虚函数实际存放在对象的头部的虚函数表中的）
...]]></description><category></category></item><item><title><![CDATA[C++ STL 学习笔记-适配器 stack、queue、priority_queue简单使用方法及注意事项]]></title><link>https://blog.csdn.net/netguang/article/details/89929493</link><guid>https://blog.csdn.net/netguang/article/details/89929493</guid><author>netguang</author><pubDate>Tue, 07 May 2019 21:12:00 +0800</pubDate><description><![CDATA[这个三个容器适配器stack、queue、priority_queue 都是包含了vector、list、deque中某个容器的包装体，也可以看作是由其他容器实现的容器，适配器没有提供迭代器，也不能同时插入或删除多个元素



stack



1.底层数据结构： 可以为：vector、deque、list 默认为deque

2.实现后进先出的值排序（栈结构）

3.支持的操作主要有：...]]></description><category></category></item><item><title><![CDATA[C++ STL 学习笔记-关联容器 set/multiset、map/multimap简单使用方法及注意事项]]></title><link>https://blog.csdn.net/netguang/article/details/89929449</link><guid>https://blog.csdn.net/netguang/article/details/89929449</guid><author>netguang</author><pubDate>Tue, 07 May 2019 21:02:54 +0800</pubDate><description><![CDATA[set/multiset

 set内部元素依据其值自动排序，每个元素只能出现一次不能重复，multiset与set相同，只不过允许元素重复

1. 底层数据结构： 红黑树.

2. 支持的函数：

 insert() 插入元素

 clear() 清空元素

 erase() 删除元素

 empty() 为空返回1，不为空返回0

 find()...]]></description><category></category></item><item><title><![CDATA[C++ STL 学习笔记-序列容器 vector、deque、list简单使用方法及注意事项]]></title><link>https://blog.csdn.net/netguang/article/details/89928250</link><guid>https://blog.csdn.net/netguang/article/details/89928250</guid><author>netguang</author><pubDate>Tue, 07 May 2019 20:29:15 +0800</pubDate><description><![CDATA[序列容器

vector

1）底层数据结构：数组

2) 支持的操作主要有：

 push_back() 尾部插入元素 （只支持尾部操作）

 front() 获取头部元素

 back() 获取尾部元素

 pop_back()  删除尾部元素

clear() ...]]></description><category></category></item></channel></rss>