<?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>Kangzj &#187; cpp</title>
	<atom:link href="http://kangzj.net/tag/cpp/feed/" rel="self" type="application/rss+xml" />
	<link>http://kangzj.net</link>
	<description>记录技术和生活~</description>
	<lastBuildDate>Wed, 08 Feb 2012 09:54:24 +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>Visual Leak Detector下载</title>
		<link>http://kangzj.net/visual-leak-detector-download/</link>
		<comments>http://kangzj.net/visual-leak-detector-download/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 19:30:55 +0000</pubDate>
		<dc:creator>kangzj</dc:creator>
				<category><![CDATA[编程算法]]></category>
		<category><![CDATA[cpp]]></category>
		<category><![CDATA[vc]]></category>
		<category><![CDATA[vc6]]></category>
		<category><![CDATA[visual leak detector]]></category>
		<category><![CDATA[vld]]></category>
		<category><![CDATA[内存泄露检测]]></category>

		<guid isPermaLink="false">http://kangzj.net/?p=1149</guid>
		<description><![CDATA[Visual C++内置内存泄露检测工具，但是功能十分有限。VLD就相当强大，可以定位文件、行号，可以非常准确地找到内存泄漏的位置。]]></description>
			<content:encoded><![CDATA[<blockquote>
<p align="center">Visual Leak Detector (VLD) 1.9h (Beta)，点<a href="http://files.brothersoft.com/development/misc_web_development/vld-1.9h-setup.exe" target="_blank">这里</a>开始下载！</p>
</blockquote>
<p>Visual C++内置内存泄露检测工具，但是功能十分有限。VLD就相当强大，可以定位文件、行号，可以非常准确地找到内存泄漏的位置，而且还<strong>免费、开源</strong>！</p>
<p>在使用的时候只要将VLD的头文件和lib文件放在工程文件中即可。</p>
<p>也可以一次设置，新工程就不用重新设置了。只介绍在Visual Studio 2003/2005中的设置方法，VC++ 6.0类似：</p>
<ol>
<li>打开Tools -&gt; Options -&gt; Projects and Solutions -&gt; VC++ Directories；</li>
<li>然后点击include files下拉列表，在末尾把VLD安装目录中的include文件夹添加进来；</li>
<p><span id="more-1149"></span></p>
<li>同样点击lib下拉列表，把VLD的lib也添加进来；</li>
<li>在需要检测内存泄漏的源文件中添加</li>
<pre lang="cpp">#include “vld.h”</pre>
<p>顺序无所谓，但是一定不能在一些预编译的文件前（如stdafx.h）。我是加在stdafx.h文件最后。</p>
<li>把安装目录下dll文件夹中的所有dll文件拷贝到工程Debug目录，也就是Debug版.exe生成的位置。点击Debug –&gt; Start Debugging 调试程序，在OUTPUT窗口中就会显示程序运行过程中的内存泄漏的文件、行号还有内容了。</li>
</ol>
<p>检测结果示例：</p>
<pre lang="code">
---------- Block 2715024 at 0x04D8A368: 512 bytes ----------
  Call Stack:
    d:\kangzj\documents\visual studio 2005\projects\rsip.root\readtiff\readtiff\segmentflag.cpp (56): CSegmentFlag::GetFlagFromArray
    d:\kangzj\documents\visual studio 2005\projects\rsip.root\readtiff\readtiff\wholeclassdlg.cpp (495): segmentThreadProc
    f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\thrdcore.cpp (109): _AfxThreadEntry
    f:\dd\vctools\crt_bld\self_x86\crt\src\threadex.c (348): _callthreadstartex
    f:\dd\vctools\crt_bld\self_x86\crt\src\threadex.c (331): _threadstartex
    0x7C80B729 (File and line number not available): GetModuleFileNameA
  Data:
    3C 3C 3C 3C    3C 3C 3C 3C    3C 3C 3C 45    45 45 45 45     < <<<<<<< <<<EEEEE
    45 45 45 3C    3C 3C 3C 3C    3C 3C 3C 3C    3C 3C 3C 3C     EEE<<<<< <<<<<<<<
    3C 3C 3C 3C    3C 3C 45 45    45 45 45 45    45 45 45 45     <<<<<<EE EEEEEEEE
    3C 3C 3C 3C    3C 3C 3C 3C    3C 3C 3C 3C    3C 3C 3C 3C     <<<<<<<< <<<<<<<<
    3C 3C 3C 3B    3B 3B 3B 3B    3B 3B 3B 42    42 42 3B 3B     <<<;;;;; ;;;BBB;;
    3B 3B 3B 3B    3B 3B 3B 3B    3B 3B 3B 42    42 38 38 38     ;;;;;;;; ;;;BB888
    38 38 38 38    38 38 38 38    38 38 38 38    38 38 38 38     88888888 88888888
    38 38 38 38    38 38 38 38    38 38 3E 3E    3E 3E 3E 3E     88888888 88>>>>>>
    3E 3E 3E 3E    3E 3E 3E 3E    3E 3E 3E 3E    3E 3E 3E 3E     >>>>>>>> >>>>>>>>
    3E 3E 3E 3E    3E 38 38 38    38 2B 2B 2B    2B 12 12 12     >>>>>888 8++++...
    12 12 12 12    12 12 12 12    12 12 12 2B    2B 2B 2B 2B     ........ ...+++++
    2B 2B 2B 2B    2B 2B 2B 37    37 37 37 37    37 37 37 37     +++++++7 77777777
    37 37 37 37    37 37 37 37    37 37 37 37    37 37 37 37     77777777 77777777
    37 37 37 37    37 37 37 37    37 37 21 21    21 21 21 21     77777777 77!!!!!!
    29 29 29 29    3A 3A 3A 3A    3A 3A 3A 3A    3A 3A 3A 3A     )))):::: ::::::::
    3A 3A 3A 3A    3A 3A 3A 44    44 44 44 44    44 44 44 44     :::::::D DDDDDDDD
    41 41 41 41    44 44 44 44    44 44 44 44    44 44 41 41     AAAADDDD DDDDDDAA
    41 41 41 41    41 41 3D 3D    3D 3D 3D 3D    3D 3D 3D 3D     AAAAAA== ========
    3D 3D 3D 3D    3D 3D 3D 3D    3D 3D 3D 3D    3D 3D 3D 3D     ======== ========
    3D 3D 3D 3D    3D 3D 3D 3D    3D 3D 3D 3D    3D 3D 3D 3D     ======== ========
    3D 3D 3D 3D    3D 3D 29 29    29 29 29 29    35 35 35 35     ======)) ))))5555
    35 35 35 35    35 35 35 35    35 35 35 35    35 35 35 35     55555555 55555555
    35 35 35 35    35 35 35 35    35 35 35 35    35 35 29 29     55555555 555555))
    29 29 29 29    32 32 32 32    32 32 32 32    32 32 32 32     ))))2222 22222222
    32 32 32 32    32 32 32 32    32 32 32 43    43 32 32 32     22222222 222CC222
    43 43 43 43    43 43 43 43    43 43 43 43    43 43 43 43     CCCCCCCC CCCCCCCC
    43 43 43 43    43 43 43 43    43 43 43 43    43 43 43 43     CCCCCCCC CCCCCCCC
    3F 3F 3F 3F    3F 3F 3F 3F    3F 3F 3F 3F    3F 3F 3F 3F     ???????? ????????
    3F 3F 3F 3F    3F 3F 3F 1C    1C 1C 1C 1C    46 46 46 46     ???????. ....FFFF
    46 46 46 46    46 46 40 40    40 40 40 40    40 40 40 40     FFFFFF@@ @@@@@@@@
    40 40 40 40    40 40 40 46    46 40 40 40    40 40 40 40     @@@@@@@F F@@@@@@@
    40 40 40 40    40 40 40 40    40 40 40 40    40 40 40 40     @@@@@@@@ @@@@@@@@
</pre>
<p>安装程序中有更详细的使用说明。</p>
<p style='text-align:left'>&copy; 2009, <a href='http://kangzj.net'>kangzj</a>. 版权所有.  </p>
<hr />
<p><small>© kangzj for <a href="http://kangzj.net">Kangzj</a>, 2009. |
<a href="http://kangzj.net/visual-leak-detector-download/">http://kangzj.net/visual-leak-detector-download/</a> |
<a href="http://kangzj.net/visual-leak-detector-download/#comments">14 条评论</a> |
Add to
<a href="http://del.icio.us/post?url=http://kangzj.net/visual-leak-detector-download/&title=Visual Leak Detector下载">del.icio.us</a>
<br/>
Post tags: <a href="http://kangzj.net/tag/cpp/" rel="tag">cpp</a>, <a href="http://kangzj.net/tag/vc/" rel="tag">vc</a>, <a href="http://kangzj.net/tag/vc6/" rel="tag">vc6</a>, <a href="http://kangzj.net/tag/visual-leak-detector/" rel="tag">visual leak detector</a>, <a href="http://kangzj.net/tag/vld/" rel="tag">vld</a>, <a href="http://kangzj.net/tag/%e5%86%85%e5%ad%98%e6%b3%84%e9%9c%b2%e6%a3%80%e6%b5%8b/" rel="tag">内存泄露检测</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://kangzj.net/visual-leak-detector-download/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>两道关于指针的C语言笔试题</title>
		<link>http://kangzj.net/2-c-pointer-questions-and-answers/</link>
		<comments>http://kangzj.net/2-c-pointer-questions-and-answers/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 00:30:33 +0000</pubDate>
		<dc:creator>kangzj</dc:creator>
				<category><![CDATA[编程算法]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[cpp]]></category>
		<category><![CDATA[c语言]]></category>
		<category><![CDATA[工作]]></category>
		<category><![CDATA[指针]]></category>
		<category><![CDATA[笔试]]></category>

		<guid isPermaLink="false">http://kangzj.net/?p=1125</guid>
		<description><![CDATA[实验室的师兄师姐都在狂做C/C++的笔试题，偶们也掺和了下，做了两道指针方面的，大家都看看吧。]]></description>
			<content:encoded><![CDATA[<p>实验室的师兄师姐为找工作都在狂做C/C++的笔试题，偶们也掺和了下，做了两道指针方面的，大家一起来看看吧。</p>
<h3>1. 求n的值。</h3>
<p>int a[20];<br />
char * p1 = (char * )a;<br />
char * p2 = (char *)(a+5);<br />
int n= p2-p1;</p>
<p>答案：20。</p>
<p>解析：int为4个字节，char为1个字节。a是int*型指针，加减运算以4个字节为单位，a+5便会指向第20个字节；而p1,p2是char*型，它们进行加减运算时以1个字节为单位。于是p1指向第1个字节而p2指向第21个字节，于是21-1=20，n的值为20。</p>
<h3>2. 求 * p 的值。</h3>
<p><span id="more-1125"></span></p>
<p>int k = 0X123456;</p>
<p>char * p = (char *) &amp;k;</p>
<p>答案：’V’（字符V）</p>
<p>解析：k为int型，32位，0&#215;123456如果写全的话应该是0&#215;00123456。&amp;k为k的地址，<strong>指向k的低位</strong>。p为char*的指针，它只指向一个字节，于是*p指向的值为0&#215;56，十进制值为86，对应的ASCII码为’V’。</p>
<blockquote><p>附：<a href="http://kangzj.net/c-pointer-usage/">深入理解C语言指针的奥秘</a>，没搞明白的同学可以全面的学习下C语言的指针及其一些应用。</p></blockquote>
<p style='text-align:left'>&copy; 2009, <a href='http://kangzj.net'>kangzj</a>. 版权所有.  </p>
<hr />
<p><small>© kangzj for <a href="http://kangzj.net">Kangzj</a>, 2009. |
<a href="http://kangzj.net/2-c-pointer-questions-and-answers/">http://kangzj.net/2-c-pointer-questions-and-answers/</a> |
<a href="http://kangzj.net/2-c-pointer-questions-and-answers/#comments">30 条评论</a> |
Add to
<a href="http://del.icio.us/post?url=http://kangzj.net/2-c-pointer-questions-and-answers/&title=两道关于指针的C语言笔试题">del.icio.us</a>
<br/>
Post tags: <a href="http://kangzj.net/tag/c/" rel="tag">c</a>, <a href="http://kangzj.net/tag/cpp/" rel="tag">cpp</a>, <a href="http://kangzj.net/tag/c%e8%af%ad%e8%a8%80/" rel="tag">c语言</a>, <a href="http://kangzj.net/tag/%e5%b7%a5%e4%bd%9c/" rel="tag">工作</a>, <a href="http://kangzj.net/tag/%e6%8c%87%e9%92%88/" rel="tag">指针</a>, <a href="http://kangzj.net/tag/%e7%ac%94%e8%af%95/" rel="tag">笔试</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://kangzj.net/2-c-pointer-questions-and-answers/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>C++中成员函数的连续调用</title>
		<link>http://kangzj.net/c-plus-plus-member-function-calls-const/</link>
		<comments>http://kangzj.net/c-plus-plus-member-function-calls-const/#comments</comments>
		<pubDate>Sun, 04 Oct 2009 19:27:30 +0000</pubDate>
		<dc:creator>kangzj</dc:creator>
				<category><![CDATA[编程算法]]></category>
		<category><![CDATA[const]]></category>
		<category><![CDATA[cpp]]></category>
		<category><![CDATA[对象]]></category>
		<category><![CDATA[引用]]></category>
		<category><![CDATA[类]]></category>
		<category><![CDATA[连续调用]]></category>

		<guid isPermaLink="false">http://kangzj.net/?p=1033</guid>
		<description><![CDATA[C++中成员函数的连续调用方法的介绍，对学习this指针和const有帮助。]]></description>
			<content:encoded><![CDATA[<p>首先说下什么是我所谓的<em>连续调用</em>，假设有一个类person：</p>
<div>
<table border="0" width="100%">
<tbody>
<tr id="p10661">
<td id="p1066code1">
<pre style="FONT-FAMILY: monospace">person a<span style="COLOR: #008080">;</span>
a.<span style="COLOR: #007788">set</span><span style="COLOR: #008000">(</span><span style="COLOR: #ff0000">"kangzj"</span><span style="COLOR: #008000">)</span>.<span style="COLOR: #007788">get</span><span style="COLOR: #008000">(</span><span style="COLOR: #008000">)</span>.<span style="COLOR: #007788">set</span><span style="COLOR: #008000">(</span><span style="COLOR: #ff0000">"abc"</span><span style="COLOR: #008000">)</span><span style="COLOR: #008080">;</span></pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>加红的部分即为本文要说的<em>连续调用</em>。</p>
<p>怎么实现呢，很简单，只要让成员函数返回一个指向当前对象的<em>引用</em>即可，于是，我这样定义这个类：</p>
<p><span id="more-1066"> <span id="more-1033"></span></span></p>
<div>
<table border="0" width="100%">
<tbody>
<tr id="p10662">
<td id="p1066code2">
<pre style="FONT-FAMILY: monospace"><span style="COLOR: #0000ff">class</span> person<span style="COLOR: #008000">{</span>
<span style="COLOR: #0000ff">private</span><span style="COLOR: #008080">:</span>
	string name<span style="COLOR: #008080">;</span>
<span style="COLOR: #0000ff">public</span><span style="COLOR: #008080">:</span>
	<span style="COLOR: #0000ff">const</span> person<span style="COLOR: #000040">&amp;</span> get<span style="COLOR: #008000">(</span><span style="COLOR: #008000">)</span> <span style="COLOR: #0000ff">const</span><span style="COLOR: #008080">;</span>
	person<span style="COLOR: #000040">&amp;</span> set<span style="COLOR: #008000">(</span>string n<span style="COLOR: #008000">)</span><span style="COLOR: #008080">;</span>
<span style="COLOR: #008000">}</span><span style="COLOR: #008080">;</span>
<span style="COLOR: #0000ff">const</span> person<span style="COLOR: #000040">&amp;</span> person<span style="COLOR: #008080">::</span><span style="COLOR: #007788">get</span><span style="COLOR: #008000">(</span><span style="COLOR: #008000">)</span><span style="COLOR: #008000">{</span>
	<span style="COLOR: #0000dd">cout</span><span style="COLOR: #000080">&lt;&lt;</span>name<span style="COLOR: #008080">;</span>
	<span style="COLOR: #0000ff">return</span> <span style="COLOR: #000040">*</span><span style="COLOR: #0000dd">this</span><span style="COLOR: #008080">;</span>
<span style="COLOR: #008000">}</span>
person<span style="COLOR: #000040">&amp;</span> person<span style="COLOR: #008080">::</span><span style="COLOR: #007788">set</span><span style="COLOR: #008000">(</span>string t<span style="COLOR: #008000">)</span><span style="COLOR: #008000">{</span>
	name<span style="COLOR: #000080">=</span>t<span style="COLOR: #008080">;</span>
	<span style="COLOR: #0000ff">return</span> <span style="COLOR: #000040">*</span><span style="COLOR: #0000dd">this</span><span style="COLOR: #008080">;</span>
<span style="COLOR: #008000">}</span></pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>Ok，可以使用了。这样的句子还是编译不会成功：</p>
<div>
<table border="0" width="100%">
<tbody>
<tr id="p10663">
<td id="p1066code3">
<pre style="FONT-FAMILY: monospace">a.<span style="COLOR: #007788">set</span><span style="COLOR: #008000">(</span><span style="COLOR: #ff0000">"kangzj"</span><span style="COLOR: #008000">)</span>.<span style="COLOR: #007788">get</span><span style="COLOR: #008000">(</span><span style="COLOR: #008000">)</span>.<span style="COLOR: #007788">set</span><span style="COLOR: #008000">(</span><span style="COLOR: #ff0000">"abitno"</span><span style="COLOR: #008000">)</span><span style="COLOR: #008080">;</span></pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>因为调用const型成员函数的this指针是const型，指向的对象也是const型，无法改变对象的成员变量。也就是说没法执行set操作，而出错。<br />
怎样来解决这个问题呢？把get()重载，在单独调用get的时候调用const型的方法，在连续调用的时候调用非const的方法（当然都是自动的），基于这种思想可以这样来设计类（下面代码可以直接编译运行）：</p>
<div>
<table border="0" width="100%">
<tbody>
<tr id="p10664">
<td id="p1066code4">
<pre style="FONT-FAMILY: monospace"><span style="COLOR: #339900">#include &lt;iostream&gt;</span>
<span style="COLOR: #339900">#include &lt;string&gt;</span>
 
<span style="COLOR: #0000ff">using</span> <span style="COLOR: #0000ff">namespace</span> std<span style="COLOR: #008080">;</span>
<span style="COLOR: #0000ff">class</span> person<span style="COLOR: #008000">{</span>
<span style="COLOR: #0000ff">private</span><span style="COLOR: #008080">:</span>
	string name<span style="COLOR: #008080">;</span>
 
<span style="COLOR: #0000ff">public</span><span style="COLOR: #008080">:</span>
	<span style="COLOR: #0000ff">const</span> person<span style="COLOR: #000040">&amp;</span> get<span style="COLOR: #008000">(</span><span style="COLOR: #008000">)</span> <span style="COLOR: #0000ff">const</span><span style="COLOR: #008080">;</span>
	person<span style="COLOR: #000040">&amp;</span> get<span style="COLOR: #008000">(</span><span style="COLOR: #008000">)</span><span style="COLOR: #008080">;</span>
	person<span style="COLOR: #000040">&amp;</span> set<span style="COLOR: #008000">(</span>string n<span style="COLOR: #008000">)</span><span style="COLOR: #008080">;</span>
<span style="COLOR: #008000">}</span><span style="COLOR: #008080">;</span>
<span style="COLOR: #0000ff">const</span> person<span style="COLOR: #000040">&amp;</span> person<span style="COLOR: #008080">::</span><span style="COLOR: #007788">get</span><span style="COLOR: #008000">(</span><span style="COLOR: #008000">)</span> <span style="COLOR: #0000ff">const</span><span style="COLOR: #008000">{</span>
	<span style="COLOR: #0000dd">cout</span><span style="COLOR: #000080">&lt;&lt;</span>name<span style="COLOR: #000080">&lt;&lt;</span><span style="COLOR: #ff0000">" -const<span style="COLOR: #000099; FONT-WEIGHT: bold">\n</span>"</span><span style="COLOR: #008080">;</span>
	<span style="COLOR: #0000ff">return</span> <span style="COLOR: #000040">*</span><span style="COLOR: #0000dd">this</span><span style="COLOR: #008080">;</span>
<span style="COLOR: #008000">}</span>
person<span style="COLOR: #000040">&amp;</span> person<span style="COLOR: #008080">::</span><span style="COLOR: #007788">get</span><span style="COLOR: #008000">(</span><span style="COLOR: #008000">)</span><span style="COLOR: #008000">{</span>
	<span style="COLOR: #0000dd">cout</span><span style="COLOR: #000080">&lt;&lt;</span>name<span style="COLOR: #000080">&lt;&lt;</span><span style="COLOR: #ff0000">" -not const<span style="COLOR: #000099; FONT-WEIGHT: bold">\n</span>"</span><span style="COLOR: #008080">;</span>
	<span style="COLOR: #0000ff">return</span> <span style="COLOR: #000040">*</span><span style="COLOR: #0000dd">this</span><span style="COLOR: #008080">;</span>
<span style="COLOR: #008000">}</span>
person<span style="COLOR: #000040">&amp;</span> person<span style="COLOR: #008080">::</span><span style="COLOR: #007788">set</span><span style="COLOR: #008000">(</span>string t<span style="COLOR: #008000">)</span><span style="COLOR: #008000">{</span>
	name<span style="COLOR: #000080">=</span>t<span style="COLOR: #008080">;</span>
	<span style="COLOR: #0000ff">return</span> <span style="COLOR: #000040">*</span><span style="COLOR: #0000dd">this</span><span style="COLOR: #008080">;</span>
<span style="COLOR: #008000">}</span>
 
<span style="COLOR: #0000ff">int</span> main<span style="COLOR: #008000">(</span><span style="COLOR: #008000">)</span>
<span style="COLOR: #008000">{</span>
	person a<span style="COLOR: #008080">;</span>
	a.<span style="COLOR: #007788">set</span><span style="COLOR: #008000">(</span><span style="COLOR: #ff0000">"kangzj"</span><span style="COLOR: #008000">)</span>.<span style="COLOR: #007788">get</span><span style="COLOR: #008000">(</span><span style="COLOR: #008000">)</span>.<span style="COLOR: #007788">set</span><span style="COLOR: #008000">(</span><span style="COLOR: #ff0000">"ddd"</span><span style="COLOR: #008000">)</span>.<span style="COLOR: #007788">get</span><span style="COLOR: #008000">(</span><span style="COLOR: #008000">)</span><span style="COLOR: #008080">;</span>
	a.<span style="COLOR: #007788">get</span><span style="COLOR: #008000">(</span><span style="COLOR: #008000">)</span><span style="COLOR: #008080">;</span>
	<span style="COLOR: #0000ff">const</span> person b<span style="COLOR: #008080">;</span>
	b.<span style="COLOR: #007788">get</span><span style="COLOR: #008000">(</span><span style="COLOR: #008000">)</span><span style="COLOR: #008080">;</span>
<span style="COLOR: #008000">}</span></pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>全文完，欢迎讨论。<br />
参考资料：《C++ Primer(第三版)》</p>
<p style='text-align:left'>&copy; 2009, <a href='http://kangzj.net'>kangzj</a>. 版权所有.  </p>
<hr />
<p><small>© kangzj for <a href="http://kangzj.net">Kangzj</a>, 2009. |
<a href="http://kangzj.net/c-plus-plus-member-function-calls-const/">http://kangzj.net/c-plus-plus-member-function-calls-const/</a> |
<a href="http://kangzj.net/c-plus-plus-member-function-calls-const/#comments">9 条评论</a> |
Add to
<a href="http://del.icio.us/post?url=http://kangzj.net/c-plus-plus-member-function-calls-const/&title=C++中成员函数的连续调用">del.icio.us</a>
<br/>
Post tags: <a href="http://kangzj.net/tag/const/" rel="tag">const</a>, <a href="http://kangzj.net/tag/cpp/" rel="tag">cpp</a>, <a href="http://kangzj.net/tag/%e5%af%b9%e8%b1%a1/" rel="tag">对象</a>, <a href="http://kangzj.net/tag/%e5%bc%95%e7%94%a8/" rel="tag">引用</a>, <a href="http://kangzj.net/tag/%e7%b1%bb/" rel="tag">类</a>, <a href="http://kangzj.net/tag/%e8%bf%9e%e7%bb%ad%e8%b0%83%e7%94%a8/" rel="tag">连续调用</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://kangzj.net/c-plus-plus-member-function-calls-const/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Huffman_哈夫曼/霍夫曼编码_C++程序</title>
		<link>http://kangzj.net/huffman-encode-decode-cpp/</link>
		<comments>http://kangzj.net/huffman-encode-decode-cpp/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 10:27:34 +0000</pubDate>
		<dc:creator>kangzj</dc:creator>
				<category><![CDATA[编程算法]]></category>
		<category><![CDATA[cpp]]></category>
		<category><![CDATA[huffman]]></category>

		<guid isPermaLink="false">/articles/8</guid>
		<description><![CDATA[写得很烂，大家凑合着看，是标准C++写的：

默认所有程序放在”d:\”。

Huffman_Code.cpp&#8230;.提取码书

<span class="readmore"><a href="http://kangzj.net/huffman-encode-decode-cpp/" title="Huffman_哈夫曼/霍夫曼编码_C++程序">阅读全文——共312字</a></span>]]></description>
			<content:encoded><![CDATA[<p>写得很烂，大家凑合着看，是标准C++写的：<br />
默认所有程序放在”d:\”。<br />
Huffman_Code.cpp&#8230;.提取码书<br />
Hencode.cpp&#8230;&#8230;&#8230;&#8230;编码<br />
Hdecode.cpp&#8230;&#8230;&#8230;&#8230;解码<br />
copare.cpp&#8230;&#8230;&#8230;&#8230;&#8230;对比编解码前后两文件是否相同</p>
<p>shannon.txt&#8230;&#8230;&#8230;&#8230;..编码源文件<br />
mashu1.txt&#8230;&#8230;&#8230;&#8230;&#8230;生成的码书文件（ascii）<br />
bianma.txt&#8230;&#8230;&#8230;&#8230;&#8230;.编码生成的文件<br />
decode.txt&#8230;&#8230;&#8230;&#8230;&#8230;解码之后的文件<br />
所有东西都在附件里：<a rel="attachment wp-att-123" href="http://kangzj.net.ru/huffman-encode-decode-cpp/huffman_coding/" target="_blank">Huffman_Coding的C++代码</a></p>
<p style='text-align:left'>&copy; 2008 &#8211; 2009, <a href='http://kangzj.net'>kangzj</a>. 版权所有.  </p>
<hr />
<p><small>© kangzj for <a href="http://kangzj.net">Kangzj</a>, 2008. |
<a href="http://kangzj.net/huffman-encode-decode-cpp/">http://kangzj.net/huffman-encode-decode-cpp/</a> |
<a href="http://kangzj.net/huffman-encode-decode-cpp/#comments">板凳还在</a> |
Add to
<a href="http://del.icio.us/post?url=http://kangzj.net/huffman-encode-decode-cpp/&title=Huffman_哈夫曼/霍夫曼编码_C++程序">del.icio.us</a>
<br/>
Post tags: <a href="http://kangzj.net/tag/cpp/" rel="tag">cpp</a>, <a href="http://kangzj.net/tag/huffman/" rel="tag">huffman</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://kangzj.net/huffman-encode-decode-cpp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

