<?xml version="1.0" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="css/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>Sipo Blog - C++</title><link>http://www.dc9.cn/</link><description>淡泊明志 - </description><generator>RainbowSoft Studio Z-Blog 1.8 Walle Build 100427</generator><language>zh-CN</language><copyright>Copyright Sipo.</copyright><pubDate>Wed, 08 Sep 2010 07:18:30 +0800</pubDate><item><title>OpenCV下的'IplImage' : undeclared identifier错误解决(stdafx.h位置)</title><author>a@b.c (sipo)</author><link>http://www.dc9.cn/post/504.html</link><pubDate>Tue, 13 May 2008 14:16:29 +0800</pubDate><guid>http://www.dc9.cn/post/504.html</guid><description><![CDATA[这个是错的,原因在于#include "stdafx.h"不能放最后<br/><br/><p class="code"><code>#include&nbsp;"highgui.h"<br/>#include&nbsp;"cv.h"<br/>#include&nbsp;"stdafx.h"<br/><br/>int&nbsp;main(int&nbsp;argc,&nbsp;char*&nbsp;argv[])<br/>{<br/>&nbsp;&nbsp;IplImage*&nbsp;pImg;<br/><br/>&nbsp;&nbsp;return&nbsp;0;<br/>}<br/><br/></code></p><br/>调换位置就可以了.<br/><br/><p class="code"><code>#include&nbsp;"stdafx.h"<br/>#include&nbsp;"highgui.h"<br/>#include&nbsp;"cv.h"<br/><br/>int&nbsp;main(int&nbsp;argc,&nbsp;char*&nbsp;argv[])<br/>{<br/>&nbsp;&nbsp;IplImage*&nbsp;pImg;<br/><br/>&nbsp;&nbsp;return&nbsp;0;<br/>}<br/></code></p>原因是:<br/>一般系统预编译的头文件包含在"stdafx.h" ,所谓头文件预编译，就是把一个工程中使用的一些标准头文件(如Windows.H、Afxwin.H)预先编译，以后该工程编译时，不再编译这部分头文件，仅仅使用预编译的结果。这样可以加快编译速度，节省时间。<br/>编译器通过一个头文件stdafx.h来使用预编译头文件。stdafx.h这个头文件名是可以在project的编译设置里指定的。编译器认为，<b>所有在指令#include "stdafx.h"前的代码都是预编译的</b>，它跳过#include "stdafx. h"指令，使用projectname.pch编译这条指令之后的所有代码。 <br/>因此，所有的CPP实现文件第一条语句都是：#include "stdafx.h"。<br/>]]></description><category>C++</category><comments>http://www.dc9.cn/post/504.html#comment</comments><wfw:comment>http://www.dc9.cn/</wfw:comment><wfw:commentRss>http://www.dc9.cn/feed.asp?cmt=504</wfw:commentRss><trackback:ping>http://www.dc9.cn/cmd.asp?act=tb&amp;id=504&amp;key=cff8a704</trackback:ping></item><item><title>Linux下进行MYSQL的C++编程起步手记</title><author>a@b.c (sipo)</author><link>http://www.dc9.cn/post/377.html</link><pubDate>Thu, 15 Feb 2007 15:40:27 +0800</pubDate><guid>http://www.dc9.cn/post/377.html</guid><description><![CDATA[首先安装必需的开发包<br/><p class="code"><code>sudo&nbsp;apt-get&nbsp;install&nbsp;gcc&nbsp;g++&nbsp;libgcc1&nbsp;libg++&nbsp;make&nbsp;gdb</code></p>安装MYSQL的C语言开发包<br/><p class="code"><code>sudo&nbsp;apt-get&nbsp;install&nbsp;libmysql++-dev&nbsp;libmysql++2c2a&nbsp;libmysqlclient15-dev&nbsp;libmysqlclient15off</code></p>把lib文件拷贝到公用<br/><p class="code"><code>sudo&nbsp;cp&nbsp;/usr/lib/mysql/*&nbsp;&nbsp;/usr/lib/</code></p>建立一个新文件test.cpp<br/><p class="code"><code>nano&nbsp;test.cpp</code></p>输入内容<br/>]]></description><category>C++</category><comments>http://www.dc9.cn/post/377.html#comment</comments><wfw:comment>http://www.dc9.cn/</wfw:comment><wfw:commentRss>http://www.dc9.cn/feed.asp?cmt=377</wfw:commentRss><trackback:ping>http://www.dc9.cn/cmd.asp?act=tb&amp;id=377&amp;key=6398bf3d</trackback:ping></item><item><title>[VC-DLL]刚改好的一个鼠标钩子源代码下载+简单使用教程</title><author>a@b.c (sipo)</author><link>http://www.dc9.cn/post/MouseHook.html</link><pubDate>Mon, 05 Jun 2006 00:42:27 +0800</pubDate><guid>http://www.dc9.cn/post/MouseHook.html</guid><description><![CDATA[一直在用VC++做项目，乐趣无穷，但一直没有什么可以发出来的东西，很多东西拿出来怕被行家笑话，其实这个也不例外...不过之所以把这个贴出来是因为实在找了半天我想用的鼠标钩子就是没找到合适的代码，大家的代码都隐藏的太深了，于是贴出来以后再找源代码的各位弟兄就能快些搜索到了。（不知道能不能排在第一页？）<br/><br/>这个是在codeproject.com里面的一个猫的眼睛随鼠标转动一个程序里的小钩子，我稍微改了一点。<br/><br/>下载：<a href="http://www.dc9.cn/upload/MouseHook_dc9cn.rar">MouseHook_dc9cn.rar</a><br/><br/><br/>使用简单介绍：<br/><br/>原来他就是检测鼠标...]]></description><category>C++</category><comments>http://www.dc9.cn/post/MouseHook.html#comment</comments><wfw:comment>http://www.dc9.cn/</wfw:comment><wfw:commentRss>http://www.dc9.cn/feed.asp?cmt=304</wfw:commentRss><trackback:ping>http://www.dc9.cn/cmd.asp?act=tb&amp;id=304&amp;key=8bb2c9b7</trackback:ping></item><item><title>关于SXNA与Z-BLOG.</title><author>a@b.c (sipo)</author><link>http://www.dc9.cn/post/303.html</link><pubDate>Thu, 01 Jun 2006 01:28:13 +0800</pubDate><guid>http://www.dc9.cn/post/303.html</guid><description><![CDATA[另外还想表达一下的是关于SXNA与Z-BLOG.<br/><br/>当时编写SXNA的时候处于幼年懵懂的时代。没有考虑过以后的发展等若干问题。大家也能看到代码与数据库结构很不好，也很难读懂。当然现在也许有能力编得更好，但是却没有时间去实现。因为自己有更重要的任务去完成。<br/><br/>XNA现在确实很热门，并且已经热了很久了，这不是一个很复杂的技术。<br/><br/>现在让我去写的话，我肯定会用c++开发一个跨平台的主动更新程序，应用于MS-SQL-SERVER/MY-SQL，并且全部用存储过程实现检索优化。<br/><br/>但是对于...]]></description><category>C++</category><comments>http://www.dc9.cn/post/303.html#comment</comments><wfw:comment>http://www.dc9.cn/</wfw:comment><wfw:commentRss>http://www.dc9.cn/feed.asp?cmt=303</wfw:commentRss><trackback:ping>http://www.dc9.cn/cmd.asp?act=tb&amp;id=303&amp;key=a0701d85</trackback:ping></item><item><title>回调函数</title><author>a@b.c (sipo)</author><link>http://www.dc9.cn/post/297.html</link><pubDate>Fri, 26 May 2006 22:52:14 +0800</pubDate><guid>http://www.dc9.cn/post/297.html</guid><description><![CDATA[今天学习了一下回调函数，编了一个小型demo.如下。<br/><br/>但是还没想出来在实际应用中能起到什么作用。听说是很有用的。<br/><br/>我觉得他的实用之处就是能传递函数指针。至少目前我是这么认为的。<br/><br/>[CODE_LITE]<br/>VC++ 6.0通过<br/><br/>typedef int(*CallBack)(char *p) ; // 声明CallBack 类型的函数指针 <br/><br/>int A(char *p){<br/>	AfxMessageBox("A");<br/>	AfxMessageBox(p);<br/>	retur...]]></description><category>C++</category><comments>http://www.dc9.cn/post/297.html#comment</comments><wfw:comment>http://www.dc9.cn/</wfw:comment><wfw:commentRss>http://www.dc9.cn/feed.asp?cmt=297</wfw:commentRss><trackback:ping>http://www.dc9.cn/cmd.asp?act=tb&amp;id=297&amp;key=81635960</trackback:ping></item></channel></rss>
