﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><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>C++博客-To Be C++-随笔分类-C++</title><link>http://www.cppblog.com/shaker/category/2564.html</link><description>shaker's Blog&lt;br&gt;生当作人杰，死亦为鬼雄，至今思项羽，不肯过江东。</description><language>zh-cn</language><lastBuildDate>Tue, 20 May 2008 02:53:31 GMT</lastBuildDate><pubDate>Tue, 20 May 2008 02:53:31 GMT</pubDate><ttl>60</ttl><item><title>BCGControlBar Library Professional Edition v9.56</title><link>http://www.cppblog.com/shaker/archive/2008/02/13/42683.html</link><dc:creator>shaker(太子)</dc:creator><author>shaker(太子)</author><pubDate>Wed, 13 Feb 2008 03:15:00 GMT</pubDate><guid>http://www.cppblog.com/shaker/archive/2008/02/13/42683.html</guid><wfw:comment>http://www.cppblog.com/shaker/comments/42683.html</wfw:comment><comments>http://www.cppblog.com/shaker/archive/2008/02/13/42683.html#Feedback</comments><slash:comments>4</slash:comments><wfw:commentRss>http://www.cppblog.com/shaker/comments/commentRss/42683.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/shaker/services/trackbacks/42683.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: BCGControlBar ("Business Components Gallery ControlBar") is an MFC extension library that allows you to create Microsoft® Office 2000/XP/2003/2007 and Microsoft® Visual Studio-like applications with full customization options (ribbons, customizable toolbars, menus, keyboard and more). &nbsp;&nbsp;<a href='http://www.cppblog.com/shaker/archive/2008/02/13/42683.html'>阅读全文</a><img src ="http://www.cppblog.com/shaker/aggbug/42683.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/shaker/" target="_blank">shaker(太子)</a> 2008-02-13 11:15 <a href="http://www.cppblog.com/shaker/archive/2008/02/13/42683.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[ZT]C++ Boost Thread 编程指南 </title><link>http://www.cppblog.com/shaker/archive/2007/10/06/33583.html</link><dc:creator>shaker(太子)</dc:creator><author>shaker(太子)</author><pubDate>Fri, 05 Oct 2007 16:05:00 GMT</pubDate><guid>http://www.cppblog.com/shaker/archive/2007/10/06/33583.html</guid><wfw:comment>http://www.cppblog.com/shaker/comments/33583.html</wfw:comment><comments>http://www.cppblog.com/shaker/archive/2007/10/06/33583.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/shaker/comments/commentRss/33583.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/shaker/services/trackbacks/33583.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: C++ Boost Thread 编程指南 &nbsp;&nbsp;<a href='http://www.cppblog.com/shaker/archive/2007/10/06/33583.html'>阅读全文</a><img src ="http://www.cppblog.com/shaker/aggbug/33583.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/shaker/" target="_blank">shaker(太子)</a> 2007-10-06 00:05 <a href="http://www.cppblog.com/shaker/archive/2007/10/06/33583.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>C++Builder2007 安装办法</title><link>http://www.cppblog.com/shaker/archive/2007/10/05/33564.html</link><dc:creator>shaker(太子)</dc:creator><author>shaker(太子)</author><pubDate>Fri, 05 Oct 2007 15:06:00 GMT</pubDate><guid>http://www.cppblog.com/shaker/archive/2007/10/05/33564.html</guid><wfw:comment>http://www.cppblog.com/shaker/comments/33564.html</wfw:comment><comments>http://www.cppblog.com/shaker/archive/2007/10/05/33564.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/shaker/comments/commentRss/33564.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/shaker/services/trackbacks/33564.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: <a href="http://www.ccrun.com/article.asp?i=1022&amp;d=j0q784" target=_blank>转自:http://www.ccrun.com/article.asp?i=1022&d=j0q784</a>&nbsp;&nbsp;<a href='http://www.cppblog.com/shaker/archive/2007/10/05/33564.html'>阅读全文</a><img src ="http://www.cppblog.com/shaker/aggbug/33564.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/shaker/" target="_blank">shaker(太子)</a> 2007-10-05 23:06 <a href="http://www.cppblog.com/shaker/archive/2007/10/05/33564.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[图书]使用wxWidgets进行跨平台程序开发</title><link>http://www.cppblog.com/shaker/archive/2007/09/27/33009.html</link><dc:creator>shaker(太子)</dc:creator><author>shaker(太子)</author><pubDate>Thu, 27 Sep 2007 05:08:00 GMT</pubDate><guid>http://www.cppblog.com/shaker/archive/2007/09/27/33009.html</guid><wfw:comment>http://www.cppblog.com/shaker/comments/33009.html</wfw:comment><comments>http://www.cppblog.com/shaker/archive/2007/09/27/33009.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/shaker/comments/commentRss/33009.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/shaker/services/trackbacks/33009.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: PDF文件&nbsp;&nbsp;<a href='http://www.cppblog.com/shaker/archive/2007/09/27/33009.html'>阅读全文</a><img src ="http://www.cppblog.com/shaker/aggbug/33009.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/shaker/" target="_blank">shaker(太子)</a> 2007-09-27 13:08 <a href="http://www.cppblog.com/shaker/archive/2007/09/27/33009.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>发一个mir2的内挂代码</title><link>http://www.cppblog.com/shaker/archive/2007/08/28/31075.html</link><dc:creator>shaker(太子)</dc:creator><author>shaker(太子)</author><pubDate>Tue, 28 Aug 2007 15:59:00 GMT</pubDate><guid>http://www.cppblog.com/shaker/archive/2007/08/28/31075.html</guid><wfw:comment>http://www.cppblog.com/shaker/comments/31075.html</wfw:comment><comments>http://www.cppblog.com/shaker/archive/2007/08/28/31075.html#Feedback</comments><slash:comments>4</slash:comments><wfw:commentRss>http://www.cppblog.com/shaker/comments/commentRss/31075.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/shaker/services/trackbacks/31075.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 过时的游戏 反正放在硬盘里面烂掉 不如发出来 看看有没人需要&nbsp;&nbsp;<a href='http://www.cppblog.com/shaker/archive/2007/08/28/31075.html'>阅读全文</a><img src ="http://www.cppblog.com/shaker/aggbug/31075.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/shaker/" target="_blank">shaker(太子)</a> 2007-08-28 23:59 <a href="http://www.cppblog.com/shaker/archive/2007/08/28/31075.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>使用boost::signals连接类成员函数</title><link>http://www.cppblog.com/shaker/archive/2007/08/28/31073.html</link><dc:creator>shaker(太子)</dc:creator><author>shaker(太子)</author><pubDate>Tue, 28 Aug 2007 15:40:00 GMT</pubDate><guid>http://www.cppblog.com/shaker/archive/2007/08/28/31073.html</guid><wfw:comment>http://www.cppblog.com/shaker/comments/31073.html</wfw:comment><comments>http://www.cppblog.com/shaker/archive/2007/08/28/31073.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/shaker/comments/commentRss/31073.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/shaker/services/trackbacks/31073.html</trackback:ping><description><![CDATA[使用boost::signals连接类成员函数 参照boost的手册<a href="http://www.boost.org/doc/html/signals/tutorial.html#id1627926">http://www.boost.org/doc/html/signals/tutorial.html#id1627926</a>&nbsp;的写法似乎在VS2005中编译不过 不知道是新的版本更新了还是手册的bug<br>应该使用类似以下的方法:<br>
<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img src="http://www.cppblog.com/Images/OutliningIndicators/None.gif" align=top><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;m_Game.sig_HpChange.connect(boost::bind(</span><span style="COLOR: #000000">&amp;</span><span style="COLOR: #000000">CMainFrame::OnHpChange,boost::</span><span style="COLOR: #0000ff">ref</span><span style="COLOR: #000000">(</span><span style="COLOR: #000000">*</span><span style="COLOR: #0000ff">this</span><span style="COLOR: #000000">),_1,_2));<br><img src="http://www.cppblog.com/Images/OutliningIndicators/None.gif" align=top></span></div><img src ="http://www.cppblog.com/shaker/aggbug/31073.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/shaker/" target="_blank">shaker(太子)</a> 2007-08-28 23:40 <a href="http://www.cppblog.com/shaker/archive/2007/08/28/31073.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>write a simple os with asm&amp;c</title><link>http://www.cppblog.com/shaker/archive/2007/05/20/24411.html</link><dc:creator>shaker(太子)</dc:creator><author>shaker(太子)</author><pubDate>Sat, 19 May 2007 16:26:00 GMT</pubDate><guid>http://www.cppblog.com/shaker/archive/2007/05/20/24411.html</guid><wfw:comment>http://www.cppblog.com/shaker/comments/24411.html</wfw:comment><comments>http://www.cppblog.com/shaker/archive/2007/05/20/24411.html#Feedback</comments><slash:comments>17</slash:comments><wfw:commentRss>http://www.cppblog.com/shaker/comments/commentRss/24411.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/shaker/services/trackbacks/24411.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 太simple了!&nbsp;&nbsp;<a href='http://www.cppblog.com/shaker/archive/2007/05/20/24411.html'>阅读全文</a><img src ="http://www.cppblog.com/shaker/aggbug/24411.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/shaker/" target="_blank">shaker(太子)</a> 2007-05-20 00:26 <a href="http://www.cppblog.com/shaker/archive/2007/05/20/24411.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>以前写的一个网络流封包类</title><link>http://www.cppblog.com/shaker/archive/2007/04/23/22682.html</link><dc:creator>shaker(太子)</dc:creator><author>shaker(太子)</author><pubDate>Mon, 23 Apr 2007 15:44:00 GMT</pubDate><guid>http://www.cppblog.com/shaker/archive/2007/04/23/22682.html</guid><wfw:comment>http://www.cppblog.com/shaker/comments/22682.html</wfw:comment><comments>http://www.cppblog.com/shaker/archive/2007/04/23/22682.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.cppblog.com/shaker/comments/commentRss/22682.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/shaker/services/trackbacks/22682.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: CStreamPacket: 为无固定结构的网络数据包传送设计的.&nbsp;&nbsp;<a href='http://www.cppblog.com/shaker/archive/2007/04/23/22682.html'>阅读全文</a><img src ="http://www.cppblog.com/shaker/aggbug/22682.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/shaker/" target="_blank">shaker(太子)</a> 2007-04-23 23:44 <a href="http://www.cppblog.com/shaker/archive/2007/04/23/22682.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>用boost::regex来做词法分析</title><link>http://www.cppblog.com/shaker/archive/2007/04/11/21653.html</link><dc:creator>shaker(太子)</dc:creator><author>shaker(太子)</author><pubDate>Wed, 11 Apr 2007 07:20:00 GMT</pubDate><guid>http://www.cppblog.com/shaker/archive/2007/04/11/21653.html</guid><wfw:comment>http://www.cppblog.com/shaker/comments/21653.html</wfw:comment><comments>http://www.cppblog.com/shaker/archive/2007/04/11/21653.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/shaker/comments/commentRss/21653.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/shaker/services/trackbacks/21653.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: boost:regex的小小应用&nbsp;&nbsp;<a href='http://www.cppblog.com/shaker/archive/2007/04/11/21653.html'>阅读全文</a><img src ="http://www.cppblog.com/shaker/aggbug/21653.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/shaker/" target="_blank">shaker(太子)</a> 2007-04-11 15:20 <a href="http://www.cppblog.com/shaker/archive/2007/04/11/21653.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>MSDN的Bug!</title><link>http://www.cppblog.com/shaker/archive/2007/02/28/19073.html</link><dc:creator>shaker(太子)</dc:creator><author>shaker(太子)</author><pubDate>Wed, 28 Feb 2007 14:59:00 GMT</pubDate><guid>http://www.cppblog.com/shaker/archive/2007/02/28/19073.html</guid><wfw:comment>http://www.cppblog.com/shaker/comments/19073.html</wfw:comment><comments>http://www.cppblog.com/shaker/archive/2007/02/28/19073.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.cppblog.com/shaker/comments/commentRss/19073.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/shaker/services/trackbacks/19073.html</trackback:ping><description><![CDATA[msdn原文<br /><br /><strong><font size="5">CListCtrl::SortItems<br /></font></strong><br />This method sorts list view items using an application-defined comparison function. The index of each item changes to reflect the new sequence. <br /><br /><font style="BACKGROUND-COLOR: #006400"><font color="#9acd32"><b>BOOL SortItems( PFNLVCOMPARE </b><em>pfnCompare</em><b>, DWORD </b><em>dwData</em><b>);</b></font></font><em></em><pre></pre><font size="4"><strong>Parameters</strong></font><dl><dt><em>pfnCompare </em></dt><dd>Specifies the address of the application-defined comparison function. The comparison function is called during the sort operation each time the relative order of two list items needs to be compared. The comparison function must be either a static member of a class or a standalone function that is not a member of any class. 
</dd><dt><em>dwData </em></dt><dd>Specifies the application-defined value that is passed to the comparison function. </dd></dl><font size="4"><strong>Return Value</strong></font><br /><br />Nonzero if it is successful; otherwise, it is zero. Remarks <br />The comparison function has the following form: <br />int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2,   LPARAM lParamSort); <pre></pre><br />The comparison function must return a negative value if the first item should precede the second, a positive value if the first item should follow the second, or zero if the two items are equivalent. <br />The <em>lParam1</em> and <em>lParam2</em> parameters specify the item data for the two items being compared. The <em>lParamSort</em> parameter is the same as the <em>dwData</em> value. <br /><font size="4"><strong><br />Example</strong></font><br /><br /><div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #008000">//</span><span style="COLOR: #008000"> Sort the item in reverse alphabetical order.</span><span style="COLOR: #008000"><br /></span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> CALLBACK <br />MyCompareProc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)<br />{<br />   </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000"> lParamSort contains a pointer to the list view control.</span><span style="COLOR: #008000"><br /></span><span style="COLOR: #000000">   CListCtrl</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000"> pListCtrl </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> (CListCtrl</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">) lParamSort;<br />   CString    strItem1 </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> pListCtrl</span><span style="COLOR: #000000">-&gt;</span><span style="COLOR: #000000">GetItemText(lParam1, </span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">);<br />   CString    strItem2 </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> pListCtrl</span><span style="COLOR: #000000">-&gt;</span><span style="COLOR: #000000">GetItemText(lParam2, </span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">);<br /><br />   </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> strcmp(strItem2, strItem1);<br />}<br /><br /></span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000"> snip_CListCtrl_SortItems()<br />{<br />   </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000"> The pointer to my list view control.</span><span style="COLOR: #008000"><br /></span><span style="COLOR: #000000">   </span><span style="COLOR: #0000ff">extern</span><span style="COLOR: #000000"> CListCtrl</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000"> pmyListCtrl;<br /><br />   </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000"> Sort the list view items using my callback procedure.</span><span style="COLOR: #008000"><br /></span><span style="COLOR: #000000">   pmyListCtrl</span><span style="COLOR: #000000">-&gt;</span><span style="COLOR: #000000">SortItems(MyCompareProc, (LPARAM) pmyListCtrl);<br />}<br /></span></div><br /><br /><font face="Verdana" color="#ff0000" size="5">例子中的代码是不能按照预想的工作的, 因为回调函数接收的2个参数是用<strong>SetItemData</strong>传入的值,而不是Item的Index!</font><img src ="http://www.cppblog.com/shaker/aggbug/19073.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/shaker/" target="_blank">shaker(太子)</a> 2007-02-28 22:59 <a href="http://www.cppblog.com/shaker/archive/2007/02/28/19073.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>更新了下TMD!几张截图</title><link>http://www.cppblog.com/shaker/archive/2007/02/28/19072.html</link><dc:creator>shaker(太子)</dc:creator><author>shaker(太子)</author><pubDate>Wed, 28 Feb 2007 14:45:00 GMT</pubDate><guid>http://www.cppblog.com/shaker/archive/2007/02/28/19072.html</guid><wfw:comment>http://www.cppblog.com/shaker/comments/19072.html</wfw:comment><comments>http://www.cppblog.com/shaker/archive/2007/02/28/19072.html#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://www.cppblog.com/shaker/comments/commentRss/19072.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/shaker/services/trackbacks/19072.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: Pictures!&nbsp;&nbsp;<a href='http://www.cppblog.com/shaker/archive/2007/02/28/19072.html'>阅读全文</a><img src ="http://www.cppblog.com/shaker/aggbug/19072.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/shaker/" target="_blank">shaker(太子)</a> 2007-02-28 22:45 <a href="http://www.cppblog.com/shaker/archive/2007/02/28/19072.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[工具]VSS2005 下载</title><link>http://www.cppblog.com/shaker/archive/2006/12/31/17052.html</link><dc:creator>shaker(太子)</dc:creator><author>shaker(太子)</author><pubDate>Sat, 30 Dec 2006 17:22:00 GMT</pubDate><guid>http://www.cppblog.com/shaker/archive/2006/12/31/17052.html</guid><wfw:comment>http://www.cppblog.com/shaker/comments/17052.html</wfw:comment><comments>http://www.cppblog.com/shaker/archive/2006/12/31/17052.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/shaker/comments/commentRss/17052.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/shaker/services/trackbacks/17052.html</trackback:ping><description><![CDATA[VSS2005下载地址<br><a href="http://www.shangdu8.com/download/Microsoft.Visual.SourceSafe.2005_01.rar">http://www.shangdu8.com/download/Microsoft.Visual.SourceSafe.2005_01.rar</a><img src ="http://www.cppblog.com/shaker/aggbug/17052.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/shaker/" target="_blank">shaker(太子)</a> 2006-12-31 01:22 <a href="http://www.cppblog.com/shaker/archive/2006/12/31/17052.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>VC2003编译boost::regex模块命令行</title><link>http://www.cppblog.com/shaker/archive/2006/12/19/16622.html</link><dc:creator>shaker(太子)</dc:creator><author>shaker(太子)</author><pubDate>Tue, 19 Dec 2006 11:54:00 GMT</pubDate><guid>http://www.cppblog.com/shaker/archive/2006/12/19/16622.html</guid><wfw:comment>http://www.cppblog.com/shaker/comments/16622.html</wfw:comment><comments>http://www.cppblog.com/shaker/archive/2006/12/19/16622.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/shaker/comments/commentRss/16622.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/shaker/services/trackbacks/16622.html</trackback:ping><description><![CDATA[bjam "-sTOOLS=vc-7_1" "-sVC71_ROOT=D:\Program Files\Microsoft Visual Studio .NET 2003\Vc7" --with-regex install<img src ="http://www.cppblog.com/shaker/aggbug/16622.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/shaker/" target="_blank">shaker(太子)</a> 2006-12-19 19:54 <a href="http://www.cppblog.com/shaker/archive/2006/12/19/16622.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[ZT]“Hello World!”的N种写法</title><link>http://www.cppblog.com/shaker/archive/2006/12/19/16620.html</link><dc:creator>shaker(太子)</dc:creator><author>shaker(太子)</author><pubDate>Tue, 19 Dec 2006 11:16:00 GMT</pubDate><guid>http://www.cppblog.com/shaker/archive/2006/12/19/16620.html</guid><wfw:comment>http://www.cppblog.com/shaker/comments/16620.html</wfw:comment><comments>http://www.cppblog.com/shaker/archive/2006/12/19/16620.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/shaker/comments/commentRss/16620.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/shaker/services/trackbacks/16620.html</trackback:ping><description><![CDATA[“Hello World!”的N种写法<br /><a href="http://www.ccrun.com/article.asp?i=999&amp;d=v433i2">http://www.ccrun.com/article.asp?i=999&amp;d=v433i2</a><img src ="http://www.cppblog.com/shaker/aggbug/16620.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/shaker/" target="_blank">shaker(太子)</a> 2006-12-19 19:16 <a href="http://www.cppblog.com/shaker/archive/2006/12/19/16620.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>传奇2TMD</title><link>http://www.cppblog.com/shaker/archive/2006/12/12/16325.html</link><dc:creator>shaker(太子)</dc:creator><author>shaker(太子)</author><pubDate>Tue, 12 Dec 2006 08:22:00 GMT</pubDate><guid>http://www.cppblog.com/shaker/archive/2006/12/12/16325.html</guid><wfw:comment>http://www.cppblog.com/shaker/comments/16325.html</wfw:comment><comments>http://www.cppblog.com/shaker/archive/2006/12/12/16325.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.cppblog.com/shaker/comments/commentRss/16325.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/shaker/services/trackbacks/16325.html</trackback:ping><description><![CDATA[算是我的一个小作品吧<img height="20" src="http://www.cppblog.com/Emoticons/QQ/15.gif" width="20" border="0" /> 不太成熟 业余时间写出来玩的 有点模仿传奇2的传神外挂<br /><br /><a href="http://www2.fxin2008.com/do0906/cq2/仿传神-他妈的脱机外挂1.0版.rar">下载</a><br /><br /><img src ="http://www.cppblog.com/shaker/aggbug/16325.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/shaker/" target="_blank">shaker(太子)</a> 2006-12-12 16:22 <a href="http://www.cppblog.com/shaker/archive/2006/12/12/16325.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>传世模拟器《淡抹夕阳》全套代码下载</title><link>http://www.cppblog.com/shaker/archive/2006/12/12/16314.html</link><dc:creator>shaker(太子)</dc:creator><author>shaker(太子)</author><pubDate>Tue, 12 Dec 2006 04:10:00 GMT</pubDate><guid>http://www.cppblog.com/shaker/archive/2006/12/12/16314.html</guid><wfw:comment>http://www.cppblog.com/shaker/comments/16314.html</wfw:comment><comments>http://www.cppblog.com/shaker/archive/2006/12/12/16314.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/shaker/comments/commentRss/16314.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/shaker/services/trackbacks/16314.html</trackback:ping><description><![CDATA[传世模拟器《淡抹夕阳》全套代码下载<br /><br /><a class="" title="下载" href="http://hack.gameres.com/showthread.asp?threadid=67764" target="_blank">下载</a><img src ="http://www.cppblog.com/shaker/aggbug/16314.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/shaker/" target="_blank">shaker(太子)</a> 2006-12-12 12:10 <a href="http://www.cppblog.com/shaker/archive/2006/12/12/16314.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>用处不大却不是没用的一个类!</title><link>http://www.cppblog.com/shaker/archive/2006/10/03/13281.html</link><dc:creator>shaker(太子)</dc:creator><author>shaker(太子)</author><pubDate>Tue, 03 Oct 2006 13:14:00 GMT</pubDate><guid>http://www.cppblog.com/shaker/archive/2006/10/03/13281.html</guid><wfw:comment>http://www.cppblog.com/shaker/comments/13281.html</wfw:comment><comments>http://www.cppblog.com/shaker/archive/2006/10/03/13281.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/shaker/comments/commentRss/13281.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/shaker/services/trackbacks/13281.html</trackback:ping><description><![CDATA[<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				<span style="COLOR: #0000ff">class</span>
				<span style="COLOR: #000000"> CSettingManager<br /><img id="Codehighlighter1_191_1147_Open_Image" onclick="this.style.display='none'; Codehighlighter1_191_1147_Open_Text.style.display='none'; Codehighlighter1_191_1147_Closed_Image.style.display='inline'; Codehighlighter1_191_1147_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_191_1147_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_191_1147_Closed_Text.style.display='none'; Codehighlighter1_191_1147_Open_Image.style.display='inline'; Codehighlighter1_191_1147_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span>
				<span id="Codehighlighter1_191_1147_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
						<img src="http://www.cppblog.com/images/dot.gif" />
				</span>
				<span id="Codehighlighter1_191_1147_Open_Text">
						<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /></span>
						<span style="COLOR: #0000ff">private</span>
						<span style="COLOR: #000000">:<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    std::map</span>
						<span style="COLOR: #000000">&lt;</span>
						<span style="COLOR: #000000">std::</span>
						<span style="COLOR: #0000ff">string</span>
						<span style="COLOR: #000000">,std::</span>
						<span style="COLOR: #0000ff">string</span>
						<span style="COLOR: #000000">&gt;</span>
						<span style="COLOR: #000000"> m_Settings;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    std::</span>
						<span style="COLOR: #0000ff">string</span>
						<span style="COLOR: #000000"> m_Filename;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /></span>
						<span style="COLOR: #0000ff">public</span>
						<span style="COLOR: #000000">:<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">void</span>
						<span style="COLOR: #000000"> Load(std::</span>
						<span style="COLOR: #0000ff">string</span>
						<span style="COLOR: #000000"> server, std::</span>
						<span style="COLOR: #0000ff">string</span>
						<span style="COLOR: #000000"> character);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">void</span>
						<span style="COLOR: #000000"> Save( </span>
						<span style="COLOR: #0000ff">void</span>
						<span style="COLOR: #000000"> );<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">const</span>
						<span style="COLOR: #000000"> std::</span>
						<span style="COLOR: #0000ff">string</span>
						<span style="COLOR: #000000">&amp;</span>
						<span style="COLOR: #000000"> Get( std::</span>
						<span style="COLOR: #0000ff">string</span>
						<span style="COLOR: #000000"> key, </span>
						<span style="COLOR: #0000ff">const</span>
						<span style="COLOR: #000000"> std::</span>
						<span style="COLOR: #0000ff">string</span>
						<span style="COLOR: #000000">&amp;</span>
						<span style="COLOR: #000000"> default_value</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000">std::</span>
						<span style="COLOR: #0000ff">string</span>
						<span style="COLOR: #000000">() )<br /><img id="Codehighlighter1_449_641_Open_Image" onclick="this.style.display='none'; Codehighlighter1_449_641_Open_Text.style.display='none'; Codehighlighter1_449_641_Closed_Image.style.display='inline'; Codehighlighter1_449_641_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_449_641_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_449_641_Closed_Text.style.display='none'; Codehighlighter1_449_641_Open_Image.style.display='inline'; Codehighlighter1_449_641_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
						<span id="Codehighlighter1_449_641_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.cppblog.com/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_449_641_Open_Text">
								<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        std::map</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000">std::</span>
								<span style="COLOR: #0000ff">string</span>
								<span style="COLOR: #000000">,std::</span>
								<span style="COLOR: #0000ff">string</span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #000000">::iterator itor</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> m_Settings.find(key);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000"> ( itor</span>
								<span style="COLOR: #000000">==</span>
								<span style="COLOR: #000000">m_Settings.end() )<br /><img id="Codehighlighter1_559_615_Open_Image" onclick="this.style.display='none'; Codehighlighter1_559_615_Open_Text.style.display='none'; Codehighlighter1_559_615_Closed_Image.style.display='inline'; Codehighlighter1_559_615_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_559_615_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_559_615_Closed_Text.style.display='none'; Codehighlighter1_559_615_Open_Image.style.display='inline'; Codehighlighter1_559_615_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        </span>
								<span id="Codehighlighter1_559_615_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.cppblog.com/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_559_615_Open_Text">
										<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            Set(key,default_value);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
										<span style="COLOR: #0000ff">return</span>
										<span style="COLOR: #000000"> default_value;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />        }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
										<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> itor</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">second;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
						</span>
						<span style="COLOR: #000000">
								<br />
								<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">void</span>
						<span style="COLOR: #000000"> Set(std::</span>
						<span style="COLOR: #0000ff">string</span>
						<span style="COLOR: #000000"> key, </span>
						<span style="COLOR: #0000ff">const</span>
						<span style="COLOR: #000000"> std::</span>
						<span style="COLOR: #0000ff">string</span>
						<span style="COLOR: #000000">&amp;</span>
						<span style="COLOR: #000000"> value)<br /><img id="Codehighlighter1_697_725_Open_Image" onclick="this.style.display='none'; Codehighlighter1_697_725_Open_Text.style.display='none'; Codehighlighter1_697_725_Closed_Image.style.display='inline'; Codehighlighter1_697_725_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_697_725_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_697_725_Closed_Text.style.display='none'; Codehighlighter1_697_725_Open_Image.style.display='inline'; Codehighlighter1_697_725_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
						<span id="Codehighlighter1_697_725_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.cppblog.com/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_697_725_Open_Text">
								<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        m_Settings[key]</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">value;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
						</span>
						<span style="COLOR: #000000">
								<br />
								<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    template</span>
						<span style="COLOR: #000000">&lt;</span>
						<span style="COLOR: #0000ff">class</span>
						<span style="COLOR: #000000"> T</span>
						<span style="COLOR: #000000">&gt;</span>
						<span style="COLOR: #000000"> T Get( std::</span>
						<span style="COLOR: #0000ff">string</span>
						<span style="COLOR: #000000"> key, T default_value</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000">T(</span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">))<br /><img id="Codehighlighter1_793_1024_Open_Image" onclick="this.style.display='none'; Codehighlighter1_793_1024_Open_Text.style.display='none'; Codehighlighter1_793_1024_Closed_Image.style.display='inline'; Codehighlighter1_793_1024_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_793_1024_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_793_1024_Closed_Text.style.display='none'; Codehighlighter1_793_1024_Open_Image.style.display='inline'; Codehighlighter1_793_1024_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
						<span id="Codehighlighter1_793_1024_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.cppblog.com/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_793_1024_Open_Text">
								<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        std::map</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000">std::</span>
								<span style="COLOR: #0000ff">string</span>
								<span style="COLOR: #000000">,std::</span>
								<span style="COLOR: #0000ff">string</span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #000000">::iterator itor</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> m_Settings.find(key);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000"> ( itor</span>
								<span style="COLOR: #000000">==</span>
								<span style="COLOR: #000000">m_Settings.end() )<br /><img id="Codehighlighter1_903_962_Open_Image" onclick="this.style.display='none'; Codehighlighter1_903_962_Open_Text.style.display='none'; Codehighlighter1_903_962_Closed_Image.style.display='inline'; Codehighlighter1_903_962_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_903_962_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_903_962_Closed_Text.style.display='none'; Codehighlighter1_903_962_Open_Image.style.display='inline'; Codehighlighter1_903_962_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        </span>
								<span id="Codehighlighter1_903_962_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.cppblog.com/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_903_962_Open_Text">
										<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            Set</span>
										<span style="COLOR: #000000">&lt;</span>
										<span style="COLOR: #000000">T</span>
										<span style="COLOR: #000000">&gt;</span>
										<span style="COLOR: #000000">(key,default_value);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
										<span style="COLOR: #0000ff">return</span>
										<span style="COLOR: #000000"> default_value;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />        }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
										<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> boost::lexical_cast</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000">T,std::</span>
								<span style="COLOR: #0000ff">string</span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #000000">(itor</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">second);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
						</span>
						<span style="COLOR: #000000">
								<br />
								<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    template</span>
						<span style="COLOR: #000000">&lt;</span>
						<span style="COLOR: #0000ff">class</span>
						<span style="COLOR: #000000"> T</span>
						<span style="COLOR: #000000">&gt;</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">void</span>
						<span style="COLOR: #000000"> Set(std::</span>
						<span style="COLOR: #0000ff">string</span>
						<span style="COLOR: #000000"> key, T value)<br /><img id="Codehighlighter1_1081_1145_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1081_1145_Open_Text.style.display='none'; Codehighlighter1_1081_1145_Closed_Image.style.display='inline'; Codehighlighter1_1081_1145_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1081_1145_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1081_1145_Closed_Text.style.display='none'; Codehighlighter1_1081_1145_Open_Image.style.display='inline'; Codehighlighter1_1081_1145_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
						<span id="Codehighlighter1_1081_1145_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.cppblog.com/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_1081_1145_Open_Text">
								<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        m_Settings[key]</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">boost::lexical_cast</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000">std::</span>
								<span style="COLOR: #0000ff">string</span>
								<span style="COLOR: #000000">,T</span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #000000">(value);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
						</span>
						<span style="COLOR: #000000">
								<br />
								<img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span>
				</span>
				<span style="COLOR: #000000">;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /></span>
		</div>
		<br />使用<br /><div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000"> Load( </span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000"> )<br /><img id="Codehighlighter1_18_1388_Open_Image" onclick="this.style.display='none'; Codehighlighter1_18_1388_Open_Text.style.display='none'; Codehighlighter1_18_1388_Closed_Image.style.display='inline'; Codehighlighter1_18_1388_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_18_1388_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_18_1388_Closed_Text.style.display='none'; Codehighlighter1_18_1388_Open_Image.style.display='inline'; Codehighlighter1_18_1388_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span id="Codehighlighter1_18_1388_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cppblog.com/images/dot.gif" /></span><span id="Codehighlighter1_18_1388_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    SmartAccelerate</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">m_Game.m_SettingMgr.Get(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">系统_智能加速</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">false</span><span style="COLOR: #000000">);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    MoveSpeed</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">m_Game.m_SettingMgr.Get(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">系统_移动速度</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,static_cast</span><span style="COLOR: #000000">&lt;</span><span style="COLOR: #000000">DWORD</span><span style="COLOR: #000000">&gt;</span><span style="COLOR: #000000">(</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">));<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    AttackSpeed</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">m_Game.m_SettingMgr.Get(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">系统_攻击速度</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,static_cast</span><span style="COLOR: #000000">&lt;</span><span style="COLOR: #000000">DWORD</span><span style="COLOR: #000000">&gt;</span><span style="COLOR: #000000">(</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">));<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    ShowMiniMap</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">m_Game.m_SettingMgr.Get(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">系统_显示实景地图</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">false</span><span style="COLOR: #000000">);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    AlwaysLongHit</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">m_Game.m_SettingMgr.Get(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">战士_刀刀刺杀</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">false</span><span style="COLOR: #000000">);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    AutoWideHit</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">m_Game.m_SettingMgr.Get(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">战士_智能半月</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">false</span><span style="COLOR: #000000">);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    WideHitLevel</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">m_Game.m_SettingMgr.Get(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">战士_智能半月数值</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,static_cast</span><span style="COLOR: #000000">&lt;</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">&gt;</span><span style="COLOR: #000000">(</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">));<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    AutoFireHit</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">m_Game.m_SettingMgr.Get(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">战士_自动烈火</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">false</span><span style="COLOR: #000000">);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    FireHitDelay</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">m_Game.m_SettingMgr.Get(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">战士_自动烈火间隔</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,static_cast</span><span style="COLOR: #000000">&lt;</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">&gt;</span><span style="COLOR: #000000">(</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">));<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    LoginScript</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">m_Game.m_SettingMgr.Get(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">脚本_上线脚本</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,std::</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">());<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    HpKeeper</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">m_Game.m_SettingMgr.Get(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">保护_HP保持</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">false</span><span style="COLOR: #000000">);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    HpKeepLevel</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">m_Game.m_SettingMgr.Get(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">保护_HP数值</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,static_cast</span><span style="COLOR: #000000">&lt;</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">&gt;</span><span style="COLOR: #000000">(</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">));<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    MpKeeper</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">m_Game.m_SettingMgr.Get(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">保护_MP保持</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">false</span><span style="COLOR: #000000">);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    MpKeepLevel</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">m_Game.m_SettingMgr.Get(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">保护_MP数值</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,static_cast</span><span style="COLOR: #000000">&lt;</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">&gt;</span><span style="COLOR: #000000">(</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">));<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    std::vector</span><span style="COLOR: #000000">&lt;</span><span style="COLOR: #000000">std::</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&gt;</span><span style="COLOR: #000000"> sl;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    std::</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000"> str</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">m_Game.m_SettingMgr.Get(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">保护_保护物品</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,std::</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">());<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    CGameMir::SplitString(str.c_str(),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,sl);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    m_ProtectItems.clear();<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000"> ( std::vector</span><span style="COLOR: #000000">&lt;</span><span style="COLOR: #000000">std::</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&gt;</span><span style="COLOR: #000000">::iterator pos</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">sl.begin(); pos</span><span style="COLOR: #000000">!=</span><span style="COLOR: #000000">sl.end(); </span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">pos )<br /><img id="Codehighlighter1_1146_1386_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1146_1386_Open_Text.style.display='none'; Codehighlighter1_1146_1386_Closed_Image.style.display='inline'; Codehighlighter1_1146_1386_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1146_1386_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1146_1386_Closed_Text.style.display='none'; Codehighlighter1_1146_1386_Open_Image.style.display='inline'; Codehighlighter1_1146_1386_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span><span id="Codehighlighter1_1146_1386_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cppblog.com/images/dot.gif" /></span><span id="Codehighlighter1_1146_1386_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        std::vector</span><span style="COLOR: #000000">&lt;</span><span style="COLOR: #000000">std::</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&gt;</span><span style="COLOR: #000000"> item;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        CGameMir::SplitString(pos</span><span style="COLOR: #000000">-&gt;</span><span style="COLOR: #000000">c_str(),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">/</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,item);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000"> ( item.size()</span><span style="COLOR: #000000">&lt;</span><span style="COLOR: #000000">3</span><span style="COLOR: #000000"> )<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            </span><span style="COLOR: #0000ff">continue</span><span style="COLOR: #000000">;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        m_ProtectItems[item[</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">]] </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"><br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            std::pair</span><span style="COLOR: #000000">&lt;</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">&gt;</span><span style="COLOR: #000000">(boost::lexical_cast</span><span style="COLOR: #000000">&lt;</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">&gt;</span><span style="COLOR: #000000">(item[</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">]),boost::lexical_cast</span><span style="COLOR: #000000">&lt;</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">&gt;</span><span style="COLOR: #000000">(item[</span><span style="COLOR: #000000">2</span><span style="COLOR: #000000">]));<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span></span><span style="COLOR: #000000"><br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="COLOR: #000000"><br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000"> Save( </span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000"> )<br /><img id="Codehighlighter1_1409_2528_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1409_2528_Open_Text.style.display='none'; Codehighlighter1_1409_2528_Closed_Image.style.display='inline'; Codehighlighter1_1409_2528_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_1409_2528_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1409_2528_Closed_Text.style.display='none'; Codehighlighter1_1409_2528_Open_Image.style.display='inline'; Codehighlighter1_1409_2528_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span id="Codehighlighter1_1409_2528_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cppblog.com/images/dot.gif" /></span><span id="Codehighlighter1_1409_2528_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    m_Game.m_SettingMgr.Set(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">系统_智能加速</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,SmartAccelerate);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    m_Game.m_SettingMgr.Set(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">系统_移动速度</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,MoveSpeed);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    m_Game.m_SettingMgr.Set(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">系统_攻击速度</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,AttackSpeed);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    m_Game.m_SettingMgr.Set(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">系统_显示实景地图</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,ShowMiniMap);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    m_Game.m_SettingMgr.Set(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">战士_刀刀刺杀</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,AlwaysLongHit);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    m_Game.m_SettingMgr.Set(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">战士_智能半月</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,AutoWideHit);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    m_Game.m_SettingMgr.Set(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">战士_智能半月数值</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,WideHitLevel);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    m_Game.m_SettingMgr.Get(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">战士_自动烈火</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,AutoFireHit);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    m_Game.m_SettingMgr.Set(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">战士_自动烈火间隔</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,FireHitDelay);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    m_Game.m_SettingMgr.Set(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">脚本_上线脚本</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,LoginScript);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    m_Game.m_SettingMgr.Set(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">保护_HP保持</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,HpKeeper);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    m_Game.m_SettingMgr.Set(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">保护_HP数值</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,HpKeepLevel);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    m_Game.m_SettingMgr.Set(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">保护_MP保持</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,MpKeeper);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    m_Game.m_SettingMgr.Set(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">保护_MP数值</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,MpKeepLevel);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    std::</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000"> str;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    str.clear();<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000"> ( std::map</span><span style="COLOR: #000000">&lt;</span><span style="COLOR: #000000">std::</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">,std::pair</span><span style="COLOR: #000000">&lt;</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">&gt;</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">&gt;</span><span style="COLOR: #000000">::iterator pos</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">m_ProtectItems.begin(); pos</span><span style="COLOR: #000000">!=</span><span style="COLOR: #000000">m_ProtectItems.end(); </span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">pos )<br /><img id="Codehighlighter1_2259_2455_Open_Image" onclick="this.style.display='none'; Codehighlighter1_2259_2455_Open_Text.style.display='none'; Codehighlighter1_2259_2455_Closed_Image.style.display='inline'; Codehighlighter1_2259_2455_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_2259_2455_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_2259_2455_Closed_Text.style.display='none'; Codehighlighter1_2259_2455_Open_Image.style.display='inline'; Codehighlighter1_2259_2455_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span><span id="Codehighlighter1_2259_2455_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cppblog.com/images/dot.gif" /></span><span id="Codehighlighter1_2259_2455_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        std::</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000"> item;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        item</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">pos</span><span style="COLOR: #000000">-&gt;</span><span style="COLOR: #000000">first;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        item</span><span style="COLOR: #000000">+=</span><span style="COLOR: #000000">(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">/</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">boost::lexical_cast</span><span style="COLOR: #000000">&lt;</span><span style="COLOR: #000000">std::</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&gt;</span><span style="COLOR: #000000">(pos</span><span style="COLOR: #000000">-&gt;</span><span style="COLOR: #000000">second.first));<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        item</span><span style="COLOR: #000000">+=</span><span style="COLOR: #000000">(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">/</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">boost::lexical_cast</span><span style="COLOR: #000000">&lt;</span><span style="COLOR: #000000">std::</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&gt;</span><span style="COLOR: #000000">(pos</span><span style="COLOR: #000000">-&gt;</span><span style="COLOR: #000000">second.second));<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        str</span><span style="COLOR: #000000">+=</span><span style="COLOR: #000000">(item</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span></span><span style="COLOR: #000000"><br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    m_Game.m_SettingMgr.Set(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">保护_保护物品</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,str);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    m_Game.m_SettingMgr.Save();<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="COLOR: #000000"><br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /></span></div><img src ="http://www.cppblog.com/shaker/aggbug/13281.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/shaker/" target="_blank">shaker(太子)</a> 2006-10-03 21:14 <a href="http://www.cppblog.com/shaker/archive/2006/10/03/13281.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>花一晚上琢磨了个Skin换肤代码,请各位指教!</title><link>http://www.cppblog.com/shaker/archive/2006/09/20/12730.html</link><dc:creator>shaker(太子)</dc:creator><author>shaker(太子)</author><pubDate>Tue, 19 Sep 2006 19:14:00 GMT</pubDate><guid>http://www.cppblog.com/shaker/archive/2006/09/20/12730.html</guid><wfw:comment>http://www.cppblog.com/shaker/comments/12730.html</wfw:comment><comments>http://www.cppblog.com/shaker/archive/2006/09/20/12730.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/shaker/comments/commentRss/12730.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/shaker/services/trackbacks/12730.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 只实现了对BUTTON的换肤 不过其他的控件基本原理是一样的吧~! 代码有点乱 并且有些部分的设计还不是很合理! 帖出来就是希望各位大侠们批评指教.&nbsp;&nbsp;<a href='http://www.cppblog.com/shaker/archive/2006/09/20/12730.html'>阅读全文</a><img src ="http://www.cppblog.com/shaker/aggbug/12730.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/shaker/" target="_blank">shaker(太子)</a> 2006-09-20 03:14 <a href="http://www.cppblog.com/shaker/archive/2006/09/20/12730.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>函数返回对象各种方法,怎样才是最高效?</title><link>http://www.cppblog.com/shaker/archive/2006/09/05/12026.html</link><dc:creator>shaker(太子)</dc:creator><author>shaker(太子)</author><pubDate>Mon, 04 Sep 2006 19:08:00 GMT</pubDate><guid>http://www.cppblog.com/shaker/archive/2006/09/05/12026.html</guid><wfw:comment>http://www.cppblog.com/shaker/comments/12026.html</wfw:comment><comments>http://www.cppblog.com/shaker/archive/2006/09/05/12026.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.cppblog.com/shaker/comments/commentRss/12026.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/shaker/services/trackbacks/12026.html</trackback:ping><description><![CDATA[
		<img height="20" src="http://www.cppblog.com/Emoticons/QQ/smile.gif" width="20" border="0" />只知道 一个函数 如果返回值是一个对象的话 肯定是要涉及到copy construct的 还会构造临时对象 那如果返回的是引用呢?<br />带着n多的疑问 写了下面的代码 来解惑<br /><br /><div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #008080"> 1</span><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /><span style="COLOR: #000000">#include </span><span style="COLOR: #000000">&lt;</span><span style="COLOR: #000000">iostream</span><span style="COLOR: #000000">&gt;</span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080"> 2</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /><br /></span><span style="COLOR: #008080"> 3</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000"> TestClass<br /></span><span style="COLOR: #008080"> 4</span><span style="COLOR: #000000"><img id="Codehighlighter1_37_646_Open_Image" onclick="this.style.display='none'; Codehighlighter1_37_646_Open_Text.style.display='none'; Codehighlighter1_37_646_Closed_Image.style.display='inline'; Codehighlighter1_37_646_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_37_646_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_37_646_Closed_Text.style.display='none'; Codehighlighter1_37_646_Open_Image.style.display='inline'; Codehighlighter1_37_646_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span id="Codehighlighter1_37_646_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cppblog.com/images/dot.gif" /></span><span id="Codehighlighter1_37_646_Open_Text"><span style="COLOR: #000000">{<br /></span><span style="COLOR: #008080"> 5</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #0000ff">private</span><span style="COLOR: #000000">:<br /></span><span style="COLOR: #008080"> 6</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> cnt;<br /></span><span style="COLOR: #008080"> 7</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> idx;<br /></span><span style="COLOR: #008080"> 8</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> age;<br /></span><span style="COLOR: #008080"> 9</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">:<br /></span><span style="COLOR: #008080">10</span><span style="COLOR: #000000"><img id="Codehighlighter1_106_118_Open_Image" onclick="this.style.display='none'; Codehighlighter1_106_118_Open_Text.style.display='none'; Codehighlighter1_106_118_Closed_Image.style.display='inline'; Codehighlighter1_106_118_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_106_118_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_106_118_Closed_Text.style.display='none'; Codehighlighter1_106_118_Open_Image.style.display='inline'; Codehighlighter1_106_118_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> GetAge()</span><span id="Codehighlighter1_106_118_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cppblog.com/images/dot.gif" /></span><span id="Codehighlighter1_106_118_Open_Text"><span style="COLOR: #000000">{</span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> age;}</span></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">11</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    TestClass(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> n)<br /></span><span style="COLOR: #008080">12</span><span style="COLOR: #000000"><img id="Codehighlighter1_139_222_Open_Image" onclick="this.style.display='none'; Codehighlighter1_139_222_Open_Text.style.display='none'; Codehighlighter1_139_222_Closed_Image.style.display='inline'; Codehighlighter1_139_222_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_139_222_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_139_222_Closed_Text.style.display='none'; Codehighlighter1_139_222_Open_Image.style.display='inline'; Codehighlighter1_139_222_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span><span id="Codehighlighter1_139_222_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cppblog.com/images/dot.gif" /></span><span id="Codehighlighter1_139_222_Open_Text"><span style="COLOR: #000000">{<br /></span><span style="COLOR: #008080">13</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        idx</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">cnt;<br /></span><span style="COLOR: #008080">14</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        cnt</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">;<br /></span><span style="COLOR: #008080">15</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /></span><span style="COLOR: #008080">16</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        age</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">n;<br /></span><span style="COLOR: #008080">17</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        std::cout</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">idx</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> TestClass(int n)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">std::endl;<br /></span><span style="COLOR: #008080">18</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">19</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    TestClass()<br /></span><span style="COLOR: #008080">20</span><span style="COLOR: #000000"><img id="Codehighlighter1_238_317_Open_Image" onclick="this.style.display='none'; Codehighlighter1_238_317_Open_Text.style.display='none'; Codehighlighter1_238_317_Closed_Image.style.display='inline'; Codehighlighter1_238_317_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_238_317_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_238_317_Closed_Text.style.display='none'; Codehighlighter1_238_317_Open_Image.style.display='inline'; Codehighlighter1_238_317_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span><span id="Codehighlighter1_238_317_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cppblog.com/images/dot.gif" /></span><span id="Codehighlighter1_238_317_Open_Text"><span style="COLOR: #000000">{<br /></span><span style="COLOR: #008080">21</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        idx</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">cnt;<br /></span><span style="COLOR: #008080">22</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        cnt</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">;<br /></span><span style="COLOR: #008080">23</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /></span><span style="COLOR: #008080">24</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        age</span><span style="COLOR: #000000">=-</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">;<br /></span><span style="COLOR: #008080">25</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        std::cout</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">idx</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> TestClass()</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">std::endl;<br /></span><span style="COLOR: #008080">26</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">27</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    TestClass(</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> TestClass</span><span style="COLOR: #000000">&amp;</span><span style="COLOR: #000000"> v)<br /></span><span style="COLOR: #008080">28</span><span style="COLOR: #000000"><img id="Codehighlighter1_351_451_Open_Image" onclick="this.style.display='none'; Codehighlighter1_351_451_Open_Text.style.display='none'; Codehighlighter1_351_451_Closed_Image.style.display='inline'; Codehighlighter1_351_451_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_351_451_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_351_451_Closed_Text.style.display='none'; Codehighlighter1_351_451_Open_Image.style.display='inline'; Codehighlighter1_351_451_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span><span id="Codehighlighter1_351_451_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cppblog.com/images/dot.gif" /></span><span id="Codehighlighter1_351_451_Open_Text"><span style="COLOR: #000000">{<br /></span><span style="COLOR: #008080">29</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        idx</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">cnt;<br /></span><span style="COLOR: #008080">30</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        cnt</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">;<br /></span><span style="COLOR: #008080">31</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /></span><span style="COLOR: #008080">32</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        age</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">v.age;<br /></span><span style="COLOR: #008080">33</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        std::cout</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">idx</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> TestClass(const TestClass&amp; v)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">std::endl;<br /></span><span style="COLOR: #008080">34</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">35</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="COLOR: #000000">~</span><span style="COLOR: #000000">TestClass()<br /></span><span style="COLOR: #008080">36</span><span style="COLOR: #000000"><img id="Codehighlighter1_468_517_Open_Image" onclick="this.style.display='none'; Codehighlighter1_468_517_Open_Text.style.display='none'; Codehighlighter1_468_517_Closed_Image.style.display='inline'; Codehighlighter1_468_517_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_468_517_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_468_517_Closed_Text.style.display='none'; Codehighlighter1_468_517_Open_Image.style.display='inline'; Codehighlighter1_468_517_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span><span id="Codehighlighter1_468_517_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cppblog.com/images/dot.gif" /></span><span id="Codehighlighter1_468_517_Open_Text"><span style="COLOR: #000000">{<br /></span><span style="COLOR: #008080">37</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        std::cout</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">idx</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> ~TestClass()</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">std::endl;<br /></span><span style="COLOR: #008080">38</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">39</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> TestClass</span><span style="COLOR: #000000">&amp;</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">operator</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> (</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> TestClass</span><span style="COLOR: #000000">&amp;</span><span style="COLOR: #000000"> v)<br /></span><span style="COLOR: #008080">40</span><span style="COLOR: #000000"><img id="Codehighlighter1_569_644_Open_Image" onclick="this.style.display='none'; Codehighlighter1_569_644_Open_Text.style.display='none'; Codehighlighter1_569_644_Closed_Image.style.display='inline'; Codehighlighter1_569_644_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_569_644_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_569_644_Closed_Text.style.display='none'; Codehighlighter1_569_644_Open_Image.style.display='inline'; Codehighlighter1_569_644_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span><span id="Codehighlighter1_569_644_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cppblog.com/images/dot.gif" /></span><span id="Codehighlighter1_569_644_Open_Text"><span style="COLOR: #000000">{<br /></span><span style="COLOR: #008080">41</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        age</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">v.age;<br /></span><span style="COLOR: #008080">42</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        std::cout</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">idx</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> operator=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">std::endl;<br /></span><span style="COLOR: #008080">43</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">*</span><span style="COLOR: #0000ff">this</span><span style="COLOR: #000000">;<br /></span><span style="COLOR: #008080">44</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">45</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="COLOR: #000000">;<br /></span><span style="COLOR: #008080">46</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /><br /></span><span style="COLOR: #008080">47</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> TestClass::cnt</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;<br /></span><span style="COLOR: #008080">48</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /><br /></span><span style="COLOR: #008080">49</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />TestClass Get()<br /></span><span style="COLOR: #008080">50</span><span style="COLOR: #000000"><img id="Codehighlighter1_689_719_Open_Image" onclick="this.style.display='none'; Codehighlighter1_689_719_Open_Text.style.display='none'; Codehighlighter1_689_719_Closed_Image.style.display='inline'; Codehighlighter1_689_719_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_689_719_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_689_719_Closed_Text.style.display='none'; Codehighlighter1_689_719_Open_Image.style.display='inline'; Codehighlighter1_689_719_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span id="Codehighlighter1_689_719_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cppblog.com/images/dot.gif" /></span><span id="Codehighlighter1_689_719_Open_Text"><span style="COLOR: #000000">{<br /></span><span style="COLOR: #008080">51</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    TestClass l(</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">);<br /></span><span style="COLOR: #008080">52</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> l;<br /></span><span style="COLOR: #008080">53</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">54</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /><br /></span><span style="COLOR: #008080">55</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />TestClass Get2()<br /></span><span style="COLOR: #008080">56</span><span style="COLOR: #000000"><img id="Codehighlighter1_739_763_Open_Image" onclick="this.style.display='none'; Codehighlighter1_739_763_Open_Text.style.display='none'; Codehighlighter1_739_763_Closed_Image.style.display='inline'; Codehighlighter1_739_763_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_739_763_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_739_763_Closed_Text.style.display='none'; Codehighlighter1_739_763_Open_Image.style.display='inline'; Codehighlighter1_739_763_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span id="Codehighlighter1_739_763_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cppblog.com/images/dot.gif" /></span><span id="Codehighlighter1_739_763_Open_Text"><span style="COLOR: #000000">{<br /></span><span style="COLOR: #008080">57</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> TestClass(</span><span style="COLOR: #000000">2</span><span style="COLOR: #000000">);<br /></span><span style="COLOR: #008080">58</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">59</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /><br /></span><span style="COLOR: #008080">60</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />TestClass</span><span style="COLOR: #000000">&amp;</span><span style="COLOR: #000000"> Get3()<br /></span><span style="COLOR: #008080">61</span><span style="COLOR: #000000"><img id="Codehighlighter1_784_814_Open_Image" onclick="this.style.display='none'; Codehighlighter1_784_814_Open_Text.style.display='none'; Codehighlighter1_784_814_Closed_Image.style.display='inline'; Codehighlighter1_784_814_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_784_814_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_784_814_Closed_Text.style.display='none'; Codehighlighter1_784_814_Open_Image.style.display='inline'; Codehighlighter1_784_814_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span id="Codehighlighter1_784_814_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cppblog.com/images/dot.gif" /></span><span id="Codehighlighter1_784_814_Open_Text"><span style="COLOR: #000000">{<br /></span><span style="COLOR: #008080">62</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    TestClass l(</span><span style="COLOR: #000000">3</span><span style="COLOR: #000000">);<br /></span><span style="COLOR: #008080">63</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> l;<br /></span><span style="COLOR: #008080">64</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">65</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /><br /></span><span style="COLOR: #008080">66</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />TestClass</span><span style="COLOR: #000000">&amp;</span><span style="COLOR: #000000"> Get4()<br /></span><span style="COLOR: #008080">67</span><span style="COLOR: #000000"><img id="Codehighlighter1_835_859_Open_Image" onclick="this.style.display='none'; Codehighlighter1_835_859_Open_Text.style.display='none'; Codehighlighter1_835_859_Closed_Image.style.display='inline'; Codehighlighter1_835_859_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_835_859_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_835_859_Closed_Text.style.display='none'; Codehighlighter1_835_859_Open_Image.style.display='inline'; Codehighlighter1_835_859_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span id="Codehighlighter1_835_859_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cppblog.com/images/dot.gif" /></span><span id="Codehighlighter1_835_859_Open_Text"><span style="COLOR: #000000">{<br /></span><span style="COLOR: #008080">68</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> TestClass(</span><span style="COLOR: #000000">4</span><span style="COLOR: #000000">);<br /></span><span style="COLOR: #008080">69</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">70</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /><br /></span><span style="COLOR: #008080">71</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000"> test(</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000">)<br /></span><span style="COLOR: #008080">72</span><span style="COLOR: #000000"><img id="Codehighlighter1_878_1207_Open_Image" onclick="this.style.display='none'; Codehighlighter1_878_1207_Open_Text.style.display='none'; Codehighlighter1_878_1207_Closed_Image.style.display='inline'; Codehighlighter1_878_1207_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_878_1207_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_878_1207_Closed_Text.style.display='none'; Codehighlighter1_878_1207_Open_Image.style.display='inline'; Codehighlighter1_878_1207_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span id="Codehighlighter1_878_1207_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cppblog.com/images/dot.gif" /></span><span id="Codehighlighter1_878_1207_Open_Text"><span style="COLOR: #000000">{<br /></span><span style="COLOR: #008080">73</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    TestClass t;<br /></span><span style="COLOR: #008080">74</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    std::cout</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">\t0</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">\tAge=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">t.GetAge()</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">std::endl;<br /></span><span style="COLOR: #008080">75</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    t</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">Get();<br /></span><span style="COLOR: #008080">76</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    std::cout</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">\t1</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">\tAge=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">t.GetAge()</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">std::endl;<br /></span><span style="COLOR: #008080">77</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    t</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">Get2();<br /></span><span style="COLOR: #008080">78</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    std::cout</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">\t2</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">\tAge=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">t.GetAge()</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">std::endl;<br /></span><span style="COLOR: #008080">79</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    t</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">Get3();<br /></span><span style="COLOR: #008080">80</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    std::cout</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">\t3</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">\tAge=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">t.GetAge()</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">std::endl;<br /></span><span style="COLOR: #008080">81</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    t</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">Get4();<br /></span><span style="COLOR: #008080">82</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    std::cout</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">\t4</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">\tAge=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">t.GetAge()</span><span style="COLOR: #000000">&lt;&lt;</span><span style="COLOR: #000000">std::endl;<br /></span><span style="COLOR: #008080">83</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">84</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /><br /></span><span style="COLOR: #008080">85</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> main(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> argc, </span><span style="COLOR: #0000ff">char</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000"> argv[])<br /></span><span style="COLOR: #008080">86</span><span style="COLOR: #000000"><img id="Codehighlighter1_1243_1283_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1243_1283_Open_Text.style.display='none'; Codehighlighter1_1243_1283_Closed_Image.style.display='inline'; Codehighlighter1_1243_1283_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_1243_1283_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1243_1283_Closed_Text.style.display='none'; Codehighlighter1_1243_1283_Open_Image.style.display='inline'; Codehighlighter1_1243_1283_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span id="Codehighlighter1_1243_1283_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cppblog.com/images/dot.gif" /></span><span id="Codehighlighter1_1243_1283_Open_Text"><span style="COLOR: #000000">{<br /></span><span style="COLOR: #008080">87</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    test();<br /></span><span style="COLOR: #008080">88</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    system(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">pause</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br /></span><span style="COLOR: #008080">89</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;<br /></span><span style="COLOR: #008080">90</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">91</span><span style="COLOR: #000000"><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /></span></div><br />代码输出是这样的<br /><img src="http://www.cppblog.com/images/cppblog_com/shaker/func_ret.png" /><br /><br />显然Get3&amp;Get4是不能得到正确的结果的,因为函数返回时,局部对象的生存期就结束了,是对象的话就被解构了,所以返回的引用也不能对应正确的对象<br /><br />Get2比Get少构造一个对象,当计算不是很复杂时Get2显然是最高效滴<img height="20" src="http://www.cppblog.com/Emoticons/QQ/smile.gif" width="20" border="0" /><img src ="http://www.cppblog.com/shaker/aggbug/12026.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/shaker/" target="_blank">shaker(太子)</a> 2006-09-05 03:08 <a href="http://www.cppblog.com/shaker/archive/2006/09/05/12026.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>用C++摆弄了一个事件模型</title><link>http://www.cppblog.com/shaker/archive/2006/09/04/12008.html</link><dc:creator>shaker(太子)</dc:creator><author>shaker(太子)</author><pubDate>Mon, 04 Sep 2006 04:27:00 GMT</pubDate><guid>http://www.cppblog.com/shaker/archive/2006/09/04/12008.html</guid><wfw:comment>http://www.cppblog.com/shaker/comments/12008.html</wfw:comment><comments>http://www.cppblog.com/shaker/archive/2006/09/04/12008.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/shaker/comments/commentRss/12008.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/shaker/services/trackbacks/12008.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 参考了一位同学的<A class="" title="" href="/lunny/archive/2006/07/30/10706.html" target=_blank>文章</A>,基本是照搬了代码,但是不知道是作者没有在VC71中测试,还是发出来的代码还是有问题的,我在VC71中编译还是有点点小小的曲折,下面是我自己根据VC71修改的!&nbsp;&nbsp;<a href='http://www.cppblog.com/shaker/archive/2006/09/04/12008.html'>阅读全文</a><img src ="http://www.cppblog.com/shaker/aggbug/12008.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/shaker/" target="_blank">shaker(太子)</a> 2006-09-04 12:27 <a href="http://www.cppblog.com/shaker/archive/2006/09/04/12008.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>在C++中定义类成员函数指针</title><link>http://www.cppblog.com/shaker/archive/2006/09/01/11924.html</link><dc:creator>shaker(太子)</dc:creator><author>shaker(太子)</author><pubDate>Fri, 01 Sep 2006 06:08:00 GMT</pubDate><guid>http://www.cppblog.com/shaker/archive/2006/09/01/11924.html</guid><wfw:comment>http://www.cppblog.com/shaker/comments/11924.html</wfw:comment><comments>http://www.cppblog.com/shaker/archive/2006/09/01/11924.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/shaker/comments/commentRss/11924.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/shaker/services/trackbacks/11924.html</trackback:ping><description><![CDATA[不知道这个标题有没有表达出我想表达的意思,就是定义一个指向类的成员函数的指针类型.<br /><br />一般的函数指针定义是这样的: <br /><br /><font color="#008000">/*****************code begin*****************/<br /></font><font color="#0000ff">typedef</font> return_type (*<em>fFunctionPoint</em>) ( ... );<br /><font color="#008000">/*****************code end******************/<br /></font><br />类成员函数是不能被转化成类似上例中的fFunctionPoint类型的. <br />定义指向类成员函数的指针类型,如下: <br /><br /><font color="#0000ff"><font color="#000000"><font color="#008000">/*****************code begin*****************/</font><br /></font>typedef</font> return_type (class_name::*<em>fMemberFunctionPoint</em>) ( ... );<br /><font color="#008000">/*****************code end******************/<br /></font><br />调用的时候使用<br /><br /><font color="#000000"><font color="#008000">/*****************code begin*****************/</font><br />class_name</font>* Object;<br /><em>fMemberFunctionPoint </em><font color="#000000">MemberFunc</font>;<br /><font style="BACKGROUND-COLOR: #ffff00" color="#000000">((*Object).*(MemberFunc))( ... );<br /></font><font style="BACKGROUND-COLOR: #ffffff" color="#008000">/*****************code end******************/<br /></font><br />恩 报告完毕<img src ="http://www.cppblog.com/shaker/aggbug/11924.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/shaker/" target="_blank">shaker(太子)</a> 2006-09-01 14:08 <a href="http://www.cppblog.com/shaker/archive/2006/09/01/11924.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>