<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Kim Chow Blog &#187; C</title>
	<atom:link href="http://www.jianblog.com/category/program/c/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jianblog.com</link>
	<description>Unix C将是我主攻的语言，现在用PHP在FreeBSD/Centos下开发。</description>
	<lastBuildDate>Fri, 23 Dec 2011 08:29:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>[转]VC代码连接PostgreSql</title>
		<link>http://www.jianblog.com/2007/06/21/389/</link>
		<comments>http://www.jianblog.com/2007/06/21/389/#comments</comments>
		<pubDate>Wed, 20 Jun 2007 16:13:06 +0000</pubDate>
		<dc:creator>Kim Chow</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[Pgsql]]></category>
		<category><![CDATA[数据库]]></category>
		<category><![CDATA[编程]]></category>

		<guid isPermaLink="false">http://www.jianblog.com/2007/06/21/389/</guid>
		<description><![CDATA[      好。。在连接postgresql时，如果用ADO或是ODBC连接的话，资料就很多了，其实用代码也没多少。只是要注意的一些小细节会折磨人很久噢。。       下载postgresql就不说了，我用的是8.0版本。在安装时，如果是软件运行的目标机器，那么，就不用选择develop选项中的组件了，如果是开发的话，你就保证其中的“include”和“lib”文件夹的组件被选中（安装过程一定要注意，因为界面会弹出很多对话框的），如果你是第二次在同一台机器上安装多次的话，有可能会产生“the user have already existed”那么可以使用net user postgres /delete （如果选择的用户名是postgres的话）；       VC开发时（其他环境其实时一样的，而且类似的例子多得要命），首先在postgresql的安装目录下的include中找到 libpq-fe.h的头文件，在lib中会有一个名为“MS”的文件夹，这个非常重要，如果找不到。那么说明安装时的开发组件没有装全，在这个文件夹中有一个“libpq.lib”的库文件这个是在windows环境下用到的库文件，不要将其中的“libpq.a”这个linux下的库添加到工程中来，这样会导致memory crash的(而且编译时不会出错，系统还认其中对数据库操作的函数噢，不可小视！）。。对，接下来就把这两个文件拷贝到当前工作目录里，或者将路径设置好就行了，可能还要拷贝进来一个头文件，编译时会提示的(小case了），可以了。。 接下来，就可以进行数据库的连接。查询了，查询时注意字符串的细节问题。。 #include &#60;libpq-fe.h&#62; &#160;  char              * string_for_query;;  PGconn        *conn_pointer;  PGresult       *result;  char       *pghost,               *pgport,               *pgoptions,               *pgtty;               *dbName;               *username;               *password;  pghost       =     “localhost”;      //IP address string is also ok         pgport        [...]]]></description>
		<wfw:commentRss>http://www.jianblog.com/2007/06/21/389/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>备忘</title>
		<link>http://www.jianblog.com/2007/05/05/382/</link>
		<comments>http://www.jianblog.com/2007/05/05/382/#comments</comments>
		<pubDate>Sat, 05 May 2007 14:41:00 +0000</pubDate>
		<dc:creator>Kim Chow</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[编程]]></category>

		<guid isPermaLink="false">http://www.jianblog.com/2007/05/05/382/</guid>
		<description><![CDATA[以前一直没有用过VC。这段时间跟着同事用VC做项目。说真的，学了不少东西。呵呵。。 起码搞清楚了系统托盘跟ADO连接MSsql以及连接用C api连接Mysql。呵呵。。 以前只会一些基本的C语句，现在也强不了多少。呵呵。。现在只会修改他们写的代码。自己还是写不出东西。 等这个项目结束之后，我好好地学些VC相关的。搞些简单的软件先。现在搞WEB已经没有什么好的突破点子了。 试一下用C/S加B/S的模式写些东西看。]]></description>
		<wfw:commentRss>http://www.jianblog.com/2007/05/05/382/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ADO连接数据库的一个warning解决</title>
		<link>http://www.jianblog.com/2007/04/24/379/</link>
		<comments>http://www.jianblog.com/2007/04/24/379/#comments</comments>
		<pubDate>Tue, 24 Apr 2007 07:58:19 +0000</pubDate>
		<dc:creator>Kim Chow</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[编程]]></category>

		<guid isPermaLink="false">http://www.jianblog.com/2007/04/24/379/</guid>
		<description><![CDATA[关于Warning C4146: 一元负运算符应用于无符号类型，结果仍为无符号类型 无符号类型只能保存非负值，所以一元负（非）应用于无符号类型时通常无意义。操作数和结果都是非负的。 实际上，当程序员试图表达最小整数值 -2147483648 时，发生此问题。该值不能写为 -2147483648，因为表达式处理分两个步骤： 计算数字 2147483648。因 2147483648 大于最大整数值 2147483647，所以其类型不是 int，而是 unsigned int。 将一元负应用于该值，得到无符号结果，该结果碰巧是 2147483648。 无符号类型的结果可能导致意外行为。如果在比较中使用该结果，则可使用无符号比较，例如另一个操作数是 int 时。这解释了下面的示例程序只输出一行的原因。 预期的第二行为 1 is greater than the most negative int，但未输出，因为 ((unsigned int)1) &#62; 2147483648 为假。 可以通过从 Limits.h 使用 MIN_INT 来避免 C4146 警告，该 MIN_INT 有 signed int 类型。 下面的示例生成 C4146： // C4146.cpp // compile with: /W2 [...]]]></description>
		<wfw:commentRss>http://www.jianblog.com/2007/04/24/379/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Warning LNK4098 : defaultlib “library” conflicts with use of other libs; use /NODEFAULTLIB:library</title>
		<link>http://www.jianblog.com/2007/04/24/378/</link>
		<comments>http://www.jianblog.com/2007/04/24/378/#comments</comments>
		<pubDate>Tue, 24 Apr 2007 01:02:11 +0000</pubDate>
		<dc:creator>Kim Chow</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[编程]]></category>

		<guid isPermaLink="false">http://www.jianblog.com/2007/04/24/378/</guid>
		<description><![CDATA[MSDN上的解释为： You are trying to link with incompatible libraries. Important   The run-time libraries now contain directives to prevent mixing different types. You’ll receive this warning if you try to use different types or debug and non-debug versions of the run-time library in the same program. For example, if you compiled one file to use one kind [...]]]></description>
		<wfw:commentRss>http://www.jianblog.com/2007/04/24/378/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Visual C++ 6.0 to connect to MySQL</title>
		<link>http://www.jianblog.com/2007/04/24/377/</link>
		<comments>http://www.jianblog.com/2007/04/24/377/#comments</comments>
		<pubDate>Tue, 24 Apr 2007 00:55:04 +0000</pubDate>
		<dc:creator>Kim Chow</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[编程]]></category>

		<guid isPermaLink="false">http://www.jianblog.com/2007/04/24/377/</guid>
		<description><![CDATA[VC++ 6.0 project settings for MySQL Working Properly with VC++ 6.0 SP6. MySQL 5.0 win32 debug C/C++: code generation-&#62; processor -&#62;pentium code generation-&#62; Use run time librarty-&#62; Multithreaded optimizations-&#62; Disable(Debug) precompliled headers-&#62; not using Link: Input-&#62;kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib libmysql.lib mysys-nt.lib regex.lib strings.lib zlib.lib Input-&#62; Ignore [...]]]></description>
		<wfw:commentRss>http://www.jianblog.com/2007/04/24/377/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

