<?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>ada的博客 – 点滴分享，用心品味生活 &#187; c++</title>
	<atom:link href="http://www.jianghuimin.com/program/cplusplus/feed" rel="self" type="application/rss+xml" />
	<link>http://www.jianghuimin.com</link>
	<description>喜欢产品设计，移动开发，捣鼓网站相关东东</description>
	<lastBuildDate>Sun, 29 Jan 2012 01:28:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Linux生成core文件、core文件路径设置</title>
		<link>http://www.jianghuimin.com/program/cplusplus/1521.html</link>
		<comments>http://www.jianghuimin.com/program/cplusplus/1521.html#comments</comments>
		<pubDate>Fri, 27 Jan 2012 14:21:33 +0000</pubDate>
		<dc:creator>mood</dc:creator>
				<category><![CDATA[c++]]></category>
		<category><![CDATA[core]]></category>

		<guid isPermaLink="false">http://www.jianghuimin.com/?p=1521</guid>
		<description><![CDATA[在Linux下产生并调试core文件 先看看我用的是个什么机器： $ uname -a Linux dev 2.4.21-9.30AXsmp #1 SMP Wed May 26 23:37:09 EDT 2004 i686 i686 i386 GNU/Linux 再看看默认的一些参数，注意core file size是个0，程序出错时不会产生core文件了。 $ ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited max locked memory (kbytes, -l) 4 max memory size (kbytes, -m) unlimited [...]]]></description>
			<content:encoded><![CDATA[<p>在Linux下产生并调试core文件 先看看我用的是个什么机器：</p>
<p>$ uname -a<br />
Linux dev 2.4.21-9.30AXsmp #1 SMP Wed May 26 23:37:09 EDT 2004 i686 i686 i386 GNU/Linux</p>
<p>再看看默认的一些参数，注意core file size是个0，程序出错时不会产生core文件了。</p>
<p><span id="more-1521"></span><br />
$ ulimit -a<br />
core file size (blocks, -c) 0<br />
data seg size (kbytes, -d) unlimited<br />
file size (blocks, -f) unlimited<br />
max locked memory (kbytes, -l) 4<br />
max memory size (kbytes, -m) unlimited<br />
open files (-n) 2048<br />
pipe size (512 bytes, -p) 8<br />
stack size (kbytes, -s) 10240<br />
cpu time (seconds, -t) unlimited<br />
max user processes (-u) 7168<br />
virtual memory (kbytes, -v) unlimited</p>
<p>写个简单的程序，看看core文件是不是会被产生。</p>
<p>$ more foo.c</p>
<p>#include <stdio.h></p>
<p>static void sub(void);</p>
<p>int main(void)<br />
{<br />
    sub();<br />
    return 0;<br />
}</p>
<p>static void sub(void)<br />
{<br />
    int *p = NULL;</p>
<p>    /* derefernce a null pointer, expect core dump. */<br />
    printf("%d", *p);<br />
}</p>
<p>$ gcc -Wall -g foo.c<br />
$ ./a.out<br />
Segmentation fault</p>
<p>$ ls -l core.*<br />
ls: core.*: No such file or directory</p>
<p>没有找到core文件，我们改改ulimit的设置，让它产生。1024是随便取的，要是core文件大于1024个块，就产生不出来了。</p>
<p>$ ulimit -c 1024</p>
<p>$ ulimit -a<br />
core file size (blocks, -c) 1024<br />
data seg size (kbytes, -d) unlimited<br />
file size (blocks, -f) unlimited<br />
max locked memory (kbytes, -l) 4<br />
max memory size (kbytes, -m) unlimited<br />
open files (-n) 2048<br />
pipe size (512 bytes, -p) 8<br />
stack size (kbytes, -s) 10240<br />
cpu time (seconds, -t) unlimited<br />
max user processes (-u) 7168<br />
virtual memory (kbytes, -v) unlimited</p>
<p>$ ./a.out<br />
Segmentation fault (core dumped)<br />
$ ls -l core.*<br />
-rw------- 1 uniware uniware 53248 Jun 30 17:10 core.9128</p>
<p>注意看上述的输出信息，多了个(core dumped)。确实产生了一个core文件，9128是该进程的PID。我们用GDB来看看这个core。</p>
<p>$ gdb --core=core.9128<br />
GNU gdb Asianux (6.0post-0.20040223.17.1AX)<br />
Copyright 2004 Free Software Foundation, Inc.<br />
GDB is free software, covered by the GNU General Public License, and you are<br />
welcome to change it and/or distribute copies of it under certain conditions.<br />
Type "show copying" to see the conditions.<br />
There is absolutely no warranty for GDB. Type "show warranty" for details.<br />
This GDB was configured as "i386-asianux-linux-gnu".<br />
Core was generated by `./a.out'.<br />
Program terminated with signal 11, Segmentation fault.<br />
#0 0x08048373 in ?? ()<br />
(gdb) bt<br />
#0 0x08048373 in ?? ()<br />
#1 0xbfffd8f8 in ?? ()<br />
#2 0x0804839e in ?? ()<br />
#3 0xb74cc6b3 in ?? ()<br />
#4 0x00000000 in ?? ()</p>
<p>此时用bt看不到backtrace，也就是调用堆栈，原来GDB还不知道符号信息在哪里。我们告诉它一下：</p>
<p>(gdb) file ./a.out<br />
Reading symbols from ./a.out...done.<br />
Using host libthread_db library "/lib/tls/libthread_db.so.1".<br />
(gdb) bt<br />
#0 0x08048373 in sub () at foo.c:17<br />
#1 0x08048359 in main () at foo.c:8</p>
<p>此时backtrace出来了。</p>
<p>(gdb) l<br />
8         sub();<br />
9         return 0;<br />
10     }<br />
11<br />
12     static void sub(void)<br />
13     {<br />
14         int *p = NULL;<br />
15<br />
16         /* derefernce a null pointer, expect core dump. */<br />
17         printf("%d", *p);<br />
(gdb)</p>
<p>在程序不寻常退出时，内核会在当前工作目录下生成一个core文件（是一个内存映像，同时加上调试信息）。使用gdb来查看core文件，可以指示出导致程序出错的代码所在文件和行数。</p>
<p>1.core文件的生成开关和大小限制<br />
---------------------------------<br />
 1）使用ulimit -c命令可查看core文件的生成开关。若结果为0，则表示关闭了此功能，不会生成core文件。<br />
 2）使用ulimit -c filesize命令，可以限制core文件的大小（filesize的单位为kbyte）。若ulimit -c unlimited，则表示core文件的大小不受限制。如果生成的信息超过此大小，将会被裁剪，最终生成一个不完整的core文件。在调试此core文件的时候，gdb会提示错误。</p>
<p>2.core文件的名称和生成路径<br />
----------------------------<br />
core文件生成路径:<br />
输入可执行文件运行命令的同一路径下。<br />
若系统生成的core文件不带其他任何扩展名称，则全部命名为core。新的core文件生成将覆盖原来的core文件。</p>
<p>1）/proc/sys/kernel/core_uses_pid可以控制core文件的文件名中是否添加pid作为扩展。文件内容为1，表示添加pid作为扩展名，生成的core文件格式为core.xxxx；为0则表示生成的core文件同一命名为core。<br />
可通过以下命令修改此文件：<br />
echo "1" > /proc/sys/kernel/core_uses_pid</p>
<p>2）proc/sys/kernel/core_pattern可以控制core文件保存位置和文件名格式。<br />
可通过以下命令修改此文件：<br />
echo "/corefile/core-%e-%p-%t" > core_pattern，可以将core文件统一生成到/corefile目录下，产生的文件名为core-命令名-pid-时间戳<br />
以下是参数列表:<br />
    %p - insert pid into filename 添加pid<br />
    %u - insert current uid into filename 添加当前uid<br />
    %g - insert current gid into filename 添加当前gid<br />
    %s - insert signal that caused the coredump into the filename 添加导致产生core的信号<br />
    %t - insert UNIX time that the coredump occurred into filename 添加core文件生成时的unix时间<br />
    %h - insert hostname where the coredump happened into filename 添加主机名<br />
    %e - insert coredumping executable name into filename 添加命令名</p>
<p>3.core文件的查看<br />
-----------------<br />
 core文件需要使用gdb来查看。<br />
 gdb ./a.out<br />
 core-file core.xxxx<br />
 使用bt命令即可看到程序出错的地方。<br />
以下两种命令方式具有相同的效果，但是在有些环境下不生效，所以推荐使用上面的命令。<br />
1）gdb -core=core.xxxx<br />
file ./a.out<br />
bt<br />
2）gdb -c core.xxxx<br />
file ./a.out<br />
bt</p>
<p>4.开发板上使用core文件调试<br />
-----------------------------<br />
如果开发板的操作系统也是linux，core调试方法依然适用。如果开发板上不支持gdb，可将开发板的环境（依赖库）、可执行文件和core文件拷贝到PC的linux下。<br />
在 PC上调试开发板上产生的core文件，需要使用交叉编译器自带的gdb，并且需要在gdb中指定solib-absolute-prefix和 solib-search-path两个变量以保证gdb能够找到可执行程序的依赖库路径。有一种建立配置文件的方法，不需要每次启动gdb都配置以上变量，即：在待运行gdb的路径下建立.gdbinit。<br />
配置文件内容：<br />
set solib-absolute-prefix YOUR_CROSS_COMPILE_PATH<br />
set solib-search-path YOUR_CROSS_COMPILE_PATH<br />
set solib-search-path YOUR_DEVELOPER_TOOLS_LIB_PATH<br />
handle SIG32 nostop noprint pass</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jianghuimin.com/program/cplusplus/1521.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>google c/c++编程风格总结</title>
		<link>http://www.jianghuimin.com/program/cplusplus/1483.html</link>
		<comments>http://www.jianghuimin.com/program/cplusplus/1483.html#comments</comments>
		<pubDate>Tue, 27 Dec 2011 08:11:21 +0000</pubDate>
		<dc:creator>mood</dc:creator>
				<category><![CDATA[c++]]></category>
		<category><![CDATA[规范]]></category>

		<guid isPermaLink="false">http://www.jianghuimin.com/?p=1483</guid>
		<description><![CDATA[先阐述几个概念： 　　Pascal Case ：当标识符由两个或者两个以上单词组成的时候，单词之间不加其他的符号，并且每个单词首字母都必须大写，例如PascalCase。 　　camel Case: 当标识符由两个或者两个以上单词组成的时候，单词间不加其他的符号，并且第一个单词以小写开头，其他单词以大写开头。例如camelCase。 　　Unix/Linux变量命名方法：当程序由两个或两个以上单词组成的时候，单词都以小写开头，并且以_连接。  　　下面是Google C++编程规范的一些内容： 　　一、命名 　　　　1）普通变量：linux命名规范 。例如：string table_name; 　　　　2）常量： k+PascalCase。例如 const int kDayInAWeek = 7; 　　　　3）类私有成员： linux命名规范+_。 例如：int parament_count_; 　　　　4）普通函数命名：PascalCase。例如：AddTableEntry()。 　　　　5）存储函数：linux命名方法。例如： 　　　　　　　int num_entries() const {return num_entries_}; 　　　　　　　void set_num_entries(){int num_entries}; 　　　　6)枚举：值为全大写组成的单词，单词以_分割。例如MY_ENUM_VALUE 　　　　7)类名、结构名：PascalCase 　　二、函数参数 　　　　输入参数在钱，输出参数在后。 　　三、头文件排序 　　　　C系统头文件 　　　　C++系统头文件 　　　　其他库头文件 　　　　本项目内头文件 　　四、文件注释 　　　　1、创建时间  作者 　　　　2、修改时间  修改人   修改函数列表 　　　　3、头文件中，首先生命该类的作用，对函数的用法作简单说明 　　五、其他约定 　　　　1、每行不要超过80个字符，包含长路径或者头文件保护的情况除外； 　　　　2、设定编辑器将tab转换为空格，最好为4个空格； 　　　　3、空循环体使用{}、continue，而不是一个分号； 　　　　4、不要使用匈牙利命名法。]]></description>
			<content:encoded><![CDATA[<p>先阐述几个概念：</p>
<p><strong>　　Pascal Case </strong>：当标识符由两个或者两个以上单词组成的时候，单词之间不加其他的符号，并且每个单词首字母都必须大写，例如PascalCase。</p>
<p><strong>　　camel Case</strong>: 当标识符由两个或者两个以上单词组成的时候，单词间不加其他的符号，并且第一个单词以小写开头，其他单词以大写开头。例如camelCase。</p>
<p>　　<strong>Unix/Linux变量命名方法</strong>：当程序由两个或两个以上单词组成的时候，单词都以小写开头，并且以_连接。 </p>
<p>　　下面是Google C++编程规范的一些内容：</p>
<p><strong>　　一、命名</strong></p>
<p>　　　　1）普通变量：linux命名规范 。例如：string table_name;</p>
<p>　　　　2）常量： k+PascalCase。例如 const int kDayInAWeek = 7;</p>
<p>　　　　3）类私有成员： linux命名规范+_。 例如：int parament_count_;</p>
<p>　　　　4）普通函数命名：PascalCase。例如：AddTableEntry()。</p>
<p>　　　　5）存储函数：linux命名方法。例如：</p>
<p>　　　　　　　int num_entries() const {return num_entries_};</p>
<p>　　　　　　　void set_num_entries(){int num_entries};</p>
<p>　　　　6)枚举：值为全大写组成的单词，单词以_分割。例如MY_ENUM_VALUE</p>
<p>　　　　7)类名、结构名：PascalCase</p>
<p>　<strong>　二、函数参数</strong></p>
<p>　　　　输入参数在钱，输出参数在后。</p>
<p>　<strong>　三、头文件排序</strong></p>
<p>　　　　C系统头文件</p>
<p>　　　　C++系统头文件</p>
<p>　　　　其他库头文件</p>
<p>　　　　本项目内头文件</p>
<p><strong>　　四、文件注释</strong></p>
<p>　　　　1、创建时间  作者</p>
<p>　　　　2、修改时间  修改人   修改函数列表</p>
<p>　　　　3、头文件中，首先生命该类的作用，对函数的用法作简单说明</p>
<p><strong>　　五、其他约定</strong></p>
<p>　　　　1、每行不要超过80个字符，包含长路径或者头文件保护的情况除外；</p>
<p>　　　　2、设定编辑器将tab转换为空格，最好为4个空格；</p>
<p>　　　　3、空循环体使用{}、continue，而不是一个分号；</p>
<p>　　　　4、不要使用匈牙利命名法。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jianghuimin.com/program/cplusplus/1483.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux动态链接库的隐式加载和显示加载</title>
		<link>http://www.jianghuimin.com/program/cplusplus/1293.html</link>
		<comments>http://www.jianghuimin.com/program/cplusplus/1293.html#comments</comments>
		<pubDate>Sun, 18 Sep 2011 14:07:20 +0000</pubDate>
		<dc:creator>mood</dc:creator>
				<category><![CDATA[c++]]></category>
		<category><![CDATA[dlopen]]></category>
		<category><![CDATA[动态链接]]></category>
		<category><![CDATA[显示]]></category>
		<category><![CDATA[隐式]]></category>

		<guid isPermaLink="false">http://www.jianghuimin.com/?p=1293</guid>
		<description><![CDATA[Linux下的动态链接库的制作和使用方法，完全是根据个人理解和经验总结，有不对的地方还请大家指正。 动态链接库的生成： 代码上与写静态链接库没什么区别，主要是在编译时，以两个文件举例： /*mylib.h*/ void Print(); /*mylib.c*/ #include #include "mylib.h" void Print() { printf("This is in mylibn"); } 编译方法如下： gcc -fpic -shared mylib.c -o mylib.so 此时将生成mylib.so动态链接库文件。 动态链接库在使用时，分为“隐式调用”和“显式调用”两种: 1.如果是隐式调用，则与静态库的使用方法差不多，注意需要包含导出函数的头文件，即mylib.h： #include ... #include "mylib.h" int main() { Print(); } 编译方法： gcc -o main main.c -L./ mylib.so 注意要加上动态链接库的搜索路径，否则编译器只会到系统路径中去寻找。 2.显式调用的方式，不必包含mylib.h，但是需要增加几个系统调用： #include ... #include  &#60;dlfcn.h&#62;// 显式加载需要用到的头文件 int main() { void [...]]]></description>
			<content:encoded><![CDATA[<p>Linux下的动态链接库的制作和使用方法，完全是根据个人理解和经验总结，有不对的地方还请大家指正。</p>
<p><strong>动态链接库的生成：</strong></p>
<p>代码上与写静态链接库没什么区别，主要是在编译时，以两个文件举例：</p>
<p>/*mylib.h*/<br />
void Print();</p>
<p>/*mylib.c*/<br />
#include<br />
#include "mylib.h"</p>
<p>void Print()<br />
{<br />
printf("This is in mylibn");<br />
}<br />
编译方法如下：</p>
<p>gcc -fpic -shared mylib.c -o mylib.so</p>
<p>此时将生成mylib.so动态链接库文件。</p>
<p><span id="more-1293"></span><br />
动态链接库在使用时，分为<strong>“隐式调用”</strong>和<strong>“显式调用”</strong>两种:</p>
<p><strong>1.如果是隐式调用，则与静态库的使用方法差不多，注意需要包含导出函数的头文件，即mylib.h：</strong></p>
<p>#include ...<br />
#include "mylib.h"</p>
<p>int main()<br />
{<br />
Print();<br />
}</p>
<p>编译方法：</p>
<p>gcc -o main main.c -L./ mylib.so</p>
<p>注意要加上动态链接库的搜索路径，否则编译器只会到系统路径中去寻找。</p>
<p><strong>2.显式调用的方式，不必包含mylib.h，但是需要增加几个系统调用：</strong></p>
<p>#include ...<br />
#include  &lt;dlfcn.h&gt;// 显式加载需要用到的头文件</p>
<p>int main()<br />
{<br />
void *pdlHandle = dlopen("./mylib.so", RTLD_LAZY); // RTLD_LAZY 延迟加载<br />
char *pszErr = dlerror();<br />
if( !pdlHandle || pszErr )<br />
{<br />
printf("Load mylib failed!n")<br />
return 1;<br />
}</p>
<p>void (*Print)() = dlsym(pdlHandle, "Print"); // 定位动态链接库中的函数<br />
if( !Print )<br />
{<br />
pszErr = dlerror();<br />
printf("Find symbol failed!%sn", pszErr);<br />
dlclose(pdlHandle);<br />
return 1;<br />
}</p>
<p>Print(); // 调用动态链接库中的函数</p>
<p>dlclose(pdlHandle); // 系统动态链接库引用数减1</p>
<p>return 0;<br />
}</p>
<p>可以看到，显式调用的代码看上去要复杂很多，但是却比隐式调用要灵活，我们不必在编译时就确定要加载哪个动态链接库，可以在运行时再确定，甚至重新加载。</p>
<p>看一下显式调用的编译方式：</p>
<p>gcc -ldl -o main main.c</p>
<p>注意要添加-ldl选项，以使用显式调用相关的函数调用</p>
<p><strong>手动加载动态链接库dlopen dlsym dlcolose </strong></p>
<p><strong>1.  打开动态链接库：</strong><br />
    #include &lt;dlfcn.h&gt;<br />
    void *dlopen(const char *filename, int flag);<br />
    该函数返回操作句柄，如：<br />
    void *pHandle = dlopen(strSoFilePath, RTLD_LAZY);</p>
<p><strong>2.  取动态对象地址：</strong><br />
    #include &lt;dlfcn.h&gt;<br />
    void *dlsym(void *pHandle, char *symbol);<br />
    dlsym根据动态链接库操作句柄(pHandle)与符号(symbol),返回符号对应的地址。<br />
    使用这个函数不但可以获取函数地址，也可以获取变量地址。比如，假设在so中<br />
    定义了一个void mytest()函数，那在使用so时先声明一个函数指针：<br />
    void (*pMytest)(),然后使用dlsym函数将函数指针pMytest指向mytest函数，<br />
    pMytest = (void (*)())dlsym(pHandle, "mytest");</p>
<p><strong>3.  关闭动态链接库：</strong><br />
    #include &lt;dlfcn.h&gt;<br />
    int dlclose(void *handle);<br />
    该函数将该.so的引用计数减一，当引用计数为0时，将它从系统中卸载。</p>
<p><strong>4.  动态库错误函数：</strong><br />
    #include &lt;dlfcn.h&gt;<br />
    const char *dlerror(void);<br />
    当动态链接库操作函数执行失败时，dlerror可以返回出错信息，返回值为NULL时   表示没有错误信息。</p>
<p>    在取到函数执行地址后，就可以在动态库的使用程序里根据动态库提供的函数接口调用动态库里的函数。在编写调用动态库的程序的Makefile文件时，需要加入编译选-ldl。</p>
<p>    从void *dlsym(void *handle, char *symbol); 的参数可以看出，该函数只传两个参数：一个指向so的handle和一个函数的symbol，所以so里面的函数应该不允许重，否则根据一个symbol不能确定指向那个函数。<br />
 </p>
<p>参考资料<a href="http://www.ibm.com/developerworks/cn/linux/l-dynamic-libraries/#list2">http://www.ibm.com/developerworks/cn/linux/l-dynamic-libraries/#list2</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jianghuimin.com/program/cplusplus/1293.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>c++类成员是类自身调用方法</title>
		<link>http://www.jianghuimin.com/program/cplusplus/1176.html</link>
		<comments>http://www.jianghuimin.com/program/cplusplus/1176.html#comments</comments>
		<pubDate>Tue, 17 Aug 2010 05:28:25 +0000</pubDate>
		<dc:creator>mood</dc:creator>
				<category><![CDATA[c++]]></category>
		<category><![CDATA[超前声明]]></category>

		<guid isPermaLink="false">http://www.jianghuimin.com/?p=1176</guid>
		<description><![CDATA[C++类的超前声明 解决了两个调试问题。 问题一　如何定义使类的成员变量保存的是该类的一个实例？ 答：　类自身不能作为其成员变量，其成员变量只能定义为类(实例)的指针或引用。 class CNode { private: CNode m_Node; // 出错 CNode *m_pNode; // 正确 } 问题二　两个类相互引用，如何声明？(超前声明) 答： class A; class B { private: A m_a; // 错误 A *m_pa; // 正确 } class A { B m_b; B *m_pb; } 其实两个问题都是类聚合时的强依赖问题。]]></description>
			<content:encoded><![CDATA[<p>C++类的超前声明<br />
解决了两个调试问题。<br />
问题一　如何定义使类的成员变量保存的是该类的一个实例？<br />
答：　类自身不能作为其成员变量，其成员变量只能定义为类(实例)的指针或引用。<br />
class CNode<br />
{<br />
private:<br />
CNode m_Node; // 出错<br />
CNode *m_pNode; // 正确<br />
}</p>
<p>问题二　两个类相互引用，如何声明？(超前声明)<br />
答：<br />
class A;</p>
<p>class B<br />
{<br />
private:<br />
A m_a; // 错误<br />
A *m_pa; // 正确<br />
}</p>
<p>class A<br />
{<br />
B m_b;<br />
B *m_pb;<br />
}</p>
<p>其实两个问题都是类聚合时的强依赖问题。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jianghuimin.com/program/cplusplus/1176.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>*** missing separator. Stop.，</title>
		<link>http://www.jianghuimin.com/program/cplusplus/1038.html</link>
		<comments>http://www.jianghuimin.com/program/cplusplus/1038.html#comments</comments>
		<pubDate>Mon, 29 Mar 2010 06:38:14 +0000</pubDate>
		<dc:creator>mood</dc:creator>
				<category><![CDATA[c++]]></category>

		<guid isPermaLink="false">http://www.jianghuimin.com/program/cplusplus/missing-separator-stop-%ef%bc%8c.html</guid>
		<description><![CDATA[一般此类错误都是由于Makefile文件该行命令语句，没有以Tab开头。]]></description>
			<content:encoded><![CDATA[<p>一般此类错误都是由于Makefile文件该行命令语句，没有以Tab开头。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jianghuimin.com/program/cplusplus/1038.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>关闭centos5.2Tab键滴滴报警声音</title>
		<link>http://www.jianghuimin.com/program/cplusplus/1031.html</link>
		<comments>http://www.jianghuimin.com/program/cplusplus/1031.html#comments</comments>
		<pubDate>Sun, 28 Feb 2010 10:29:12 +0000</pubDate>
		<dc:creator>mood</dc:creator>
				<category><![CDATA[c++]]></category>
		<category><![CDATA[centos]]></category>

		<guid isPermaLink="false">http://www.jianghuimin.com/?p=1031</guid>
		<description><![CDATA[编辑/etc/inputrc 去掉#set bell-style none前的井号，就可以脱离烦恼的滴滴声了。赶快去试试吧。]]></description>
			<content:encoded><![CDATA[<p>编辑/etc/inputrc</p>
<p>去掉#set bell-style none前的井号，就可以脱离烦恼的滴滴声了。赶快去试试吧。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jianghuimin.com/program/cplusplus/1031.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>visual stdio 中的_tmain是什么？</title>
		<link>http://www.jianghuimin.com/program/cplusplus/1028.html</link>
		<comments>http://www.jianghuimin.com/program/cplusplus/1028.html#comments</comments>
		<pubDate>Mon, 22 Feb 2010 02:20:20 +0000</pubDate>
		<dc:creator>mood</dc:creator>
				<category><![CDATA[c++]]></category>
		<category><![CDATA[main]]></category>

		<guid isPermaLink="false">http://www.jianghuimin.com/?p=1028</guid>
		<description><![CDATA[当使用visual stdio建立工程后，默认的入口时int _tmain(int argc, _TCHAR* argv[]),而不是常见的main()函数。 实际上_tmain是main的别名定义在#include &#60;tchar.h&#62;中的#define _tmain main，必须包含此头文件才能编译通过。编译后认为main。 默认是把#include &#60;tchar.h&#62;放在预编译头文件中stdafx.h中的，大家可以打开看看。 对了，还没说为什么要用_tmain(),是为了保证移植unicode而加入的（一般_t、_T、T()这些东西都和unicode有关系）]]></description>
			<content:encoded><![CDATA[<p>当使用visual stdio建立工程后，默认的入口时int _tmain(int argc, _TCHAR* argv[]),而不是常见的main()函数。</p>
<p>实际上_tmain是main的别名定义在#include &lt;tchar.h&gt;中的#define _tmain main，必须包含此头文件才能编译通过。编译后认为main。</p>
<p>默认是把#include &lt;tchar.h&gt;放在预编译头文件中stdafx.h中的，大家可以打开看看。</p>
<p>对了，还没说为什么要用_tmain(),是为了保证移植unicode而加入的（一般_t、_T、T()这些东西都和unicode有关系）</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jianghuimin.com/program/cplusplus/1028.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

