﻿<?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++博客-OnTheWay2012-最新评论</title><link>http://www.cppblog.com/OnTheWay2008/CommentsRSS.aspx</link><description>埋葬昨天的我，迎来重生的我！</description><language>zh-cn</language><pubDate>Sun, 09 Jan 2011 01:23:16 GMT</pubDate><lastBuildDate>Sun, 09 Jan 2011 01:23:16 GMT</lastBuildDate><generator>cnblogs</generator><item><title>re: 对“随笔”所写的一篇文章《链表实验》的一点看法</title><link>http://www.cppblog.com/OnTheWay2008/archive/2011/01/09/138178.html#138208</link><dc:creator>陈梓瀚(vczh)</dc:creator><author>陈梓瀚(vczh)</author><pubDate>Sun, 09 Jan 2011 11:58:00 GMT</pubDate><guid>http://www.cppblog.com/OnTheWay2008/archive/2011/01/09/138178.html#138208</guid><description><![CDATA[我认为问题只需要修改成，只将某一个指定的vector&lt;Student&gt;里面的Student实例视为合法实例就好了。其他地方存放的Student都是非法的，但是不禁止复制，只是复制后改了也没用的意思。<img src ="http://www.cppblog.com/OnTheWay2008/aggbug/138208.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/OnTheWay2008/" target="_blank">陈梓瀚(vczh)</a> 2011-01-09 19:58 <a href="http://www.cppblog.com/OnTheWay2008/archive/2011/01/09/138178.html#138208#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 对“随笔”所写的一篇文章《链表实验》的一点看法</title><link>http://www.cppblog.com/OnTheWay2008/archive/2011/01/09/138178.html#138187</link><dc:creator>あ维w&amp;#234;iセ</dc:creator><author>あ维w&amp;#234;iセ</author><pubDate>Sun, 09 Jan 2011 03:17:00 GMT</pubDate><guid>http://www.cppblog.com/OnTheWay2008/archive/2011/01/09/138178.html#138187</guid><description><![CDATA[谢谢咯，呵呵。我喜欢这代码风格，向你学习<img src ="http://www.cppblog.com/OnTheWay2008/aggbug/138187.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/OnTheWay2008/" target="_blank">あ维w&#234;iセ</a> 2011-01-09 11:17 <a href="http://www.cppblog.com/OnTheWay2008/archive/2011/01/09/138178.html#138187#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 一种基于引用计数机制的智能指针实现</title><link>http://www.cppblog.com/OnTheWay2008/archive/2010/12/21/136810.html#137137</link><dc:creator>叫我老王吧</dc:creator><author>叫我老王吧</author><pubDate>Tue, 21 Dec 2010 11:49:00 GMT</pubDate><guid>http://www.cppblog.com/OnTheWay2008/archive/2010/12/21/136810.html#137137</guid><description><![CDATA[把A *p = new A();这句换成A p;不行吗？<img src ="http://www.cppblog.com/OnTheWay2008/aggbug/137137.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/OnTheWay2008/" target="_blank">叫我老王吧</a> 2010-12-21 19:49 <a href="http://www.cppblog.com/OnTheWay2008/archive/2010/12/21/136810.html#137137#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 一种基于引用计数机制的智能指针实现</title><link>http://www.cppblog.com/OnTheWay2008/archive/2010/12/18/136810.html#136854</link><dc:creator>Phuehvk</dc:creator><author>Phuehvk</author><pubDate>Sat, 18 Dec 2010 12:38:00 GMT</pubDate><guid>http://www.cppblog.com/OnTheWay2008/archive/2010/12/18/136810.html#136854</guid><description><![CDATA[Boost 里面有，在C++ TR1 里面也已经有这种指针(就是来自Boost)<img src ="http://www.cppblog.com/OnTheWay2008/aggbug/136854.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/OnTheWay2008/" target="_blank">Phuehvk</a> 2010-12-18 20:38 <a href="http://www.cppblog.com/OnTheWay2008/archive/2010/12/18/136810.html#136854#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 一种基于引用计数机制的智能指针实现[未登录]</title><link>http://www.cppblog.com/OnTheWay2008/archive/2010/12/17/136810.html#136811</link><dc:creator>hdqqq</dc:creator><author>hdqqq</author><pubDate>Fri, 17 Dec 2010 14:55:00 GMT</pubDate><guid>http://www.cppblog.com/OnTheWay2008/archive/2010/12/17/136810.html#136811</guid><description><![CDATA[比较讨厌这种引用计数指针的使用，一旦使用就意味这在所有的函数参数中必须使用指针引用或者值拷贝，一旦某些函数要求用裸指针，就可能引发问题。<img src ="http://www.cppblog.com/OnTheWay2008/aggbug/136811.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/OnTheWay2008/" target="_blank">hdqqq</a> 2010-12-17 22:55 <a href="http://www.cppblog.com/OnTheWay2008/archive/2010/12/17/136810.html#136811#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: Why I am so stupid?</title><link>http://www.cppblog.com/OnTheWay2008/archive/2010/12/13/135530.html#136319</link><dc:creator>crossgate</dc:creator><author>crossgate</author><pubDate>Mon, 13 Dec 2010 09:53:00 GMT</pubDate><guid>http://www.cppblog.com/OnTheWay2008/archive/2010/12/13/135530.html#136319</guid><description><![CDATA[不觉得这个是C++的高级语法特性，觉得是比较常规的，实用的特性。<br><br>如果if判断的时候，统一用 if (!pInt)，会更合适。重载!操作符，会更容易，也更一般化一些。<img src ="http://www.cppblog.com/OnTheWay2008/aggbug/136319.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/OnTheWay2008/" target="_blank">crossgate</a> 2010-12-13 17:53 <a href="http://www.cppblog.com/OnTheWay2008/archive/2010/12/13/135530.html#136319#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: Why I am so stupid?</title><link>http://www.cppblog.com/OnTheWay2008/archive/2010/12/06/135530.html#135558</link><dc:creator>空明流转</dc:creator><author>空明流转</author><pubDate>Mon, 06 Dec 2010 02:27:00 GMT</pubDate><guid>http://www.cppblog.com/OnTheWay2008/archive/2010/12/06/135530.html#135558</guid><description><![CDATA[写boost的人是挖空心思从Spec里面想抠出点东西拿来用。<br><br>那个令人发指的typeof更是连编译器bug都用上了。<br><br>你要是挖空心思，其实也是可以的。。。<img src ="http://www.cppblog.com/OnTheWay2008/aggbug/135558.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/OnTheWay2008/" target="_blank">空明流转</a> 2010-12-06 10:27 <a href="http://www.cppblog.com/OnTheWay2008/archive/2010/12/06/135530.html#135558#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: Why I am so stupid?</title><link>http://www.cppblog.com/OnTheWay2008/archive/2010/12/06/135530.html#135554</link><dc:creator>Sosi</dc:creator><author>Sosi</author><pubDate>Mon, 06 Dec 2010 00:44:00 GMT</pubDate><guid>http://www.cppblog.com/OnTheWay2008/archive/2010/12/06/135530.html#135554</guid><description><![CDATA[Boost 乃一大宝藏。。。<img src ="http://www.cppblog.com/OnTheWay2008/aggbug/135554.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/OnTheWay2008/" target="_blank">Sosi</a> 2010-12-06 08:44 <a href="http://www.cppblog.com/OnTheWay2008/archive/2010/12/06/135530.html#135554#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: Why I am so stupid?</title><link>http://www.cppblog.com/OnTheWay2008/archive/2010/12/05/135530.html#135541</link><dc:creator>right</dc:creator><author>right</author><pubDate>Sun, 05 Dec 2010 15:19:00 GMT</pubDate><guid>http://www.cppblog.com/OnTheWay2008/archive/2010/12/05/135530.html#135541</guid><description><![CDATA[最近不知道怎么搞的，如果有人跟我研究这些C++的高级语法高级特性时，我总是有种想泼冷水的冲动。不过想想自己也是这么走过来的，也就逐渐释然了。<img src ="http://www.cppblog.com/OnTheWay2008/aggbug/135541.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/OnTheWay2008/" target="_blank">right</a> 2010-12-05 23:19 <a href="http://www.cppblog.com/OnTheWay2008/archive/2010/12/05/135530.html#135541#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 一道面试题（求一个unsigned int 数的二进制表示中有多少个1？）</title><link>http://www.cppblog.com/OnTheWay2008/archive/2010/11/24/110467.html#134573</link><dc:creator>triangle</dc:creator><author>triangle</author><pubDate>Wed, 24 Nov 2010 15:22:00 GMT</pubDate><guid>http://www.cppblog.com/OnTheWay2008/archive/2010/11/24/110467.html#134573</guid><description><![CDATA[@OnTheWay<br> 第一行代码：nValue = ((0xaaaaaaaa &amp; nValue)&gt;&gt;1) + (0x55555555 &amp; nValue);<br>将32位数分为16组，判断出每两位中有多少个1,并用两位来表示结果。<br>(0xaaaaaaaa &amp; nValue)&gt;&gt;1) 计算偶数位是否为1; 如10&amp;10&gt;&gt;1 = 01<br>(0x55555555 &amp; nValue) 计算基数为是否为1; 如10&amp;01= 00<br>两数相加得出10中包含的1的个数为0x01;<br>后面的代码则是如何将16组2位数相加得出最后的结果。<br>第二行代码：((0xcccccccc &amp; nValue)&gt;&gt;2) + (0x33333333 &amp; nValue);<br>将nValue的分成8组，每组中的两两相加;<br>如(0110 &amp; 1100)&gt;&gt;2 + (0110 &amp; 0011) = 0011; 即 01 + 10 = 0011;<br>同理：<br> 第三行代码： 将nValue分成4组，每组中的两两相加，也就是每4位相加，结果保存在8位数中。<br>第四行代码：  将nValue分成2组，每组中的两两相加，也就是每8位相加，结果保存在16位数中。<br>第五行代码：  将nValue分成1组，每组中的两两相加，也就是每16位相加，结果保存在32位数中。<br><br><br><br><br><br><br><img src ="http://www.cppblog.com/OnTheWay2008/aggbug/134573.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/OnTheWay2008/" target="_blank">triangle</a> 2010-11-24 23:22 <a href="http://www.cppblog.com/OnTheWay2008/archive/2010/11/24/110467.html#134573#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>