﻿<?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++博客-Believe-最新评论</title><link>http://www.cppblog.com/SINE/CommentsRSS.aspx</link><description>人生就像跑步一样，只要你肯接着跑，就会前进！</description><language>zh-cn</language><pubDate>Sat, 07 May 2011 08:13:06 GMT</pubDate><lastBuildDate>Sat, 07 May 2011 08:13:06 GMT</lastBuildDate><generator>cnblogs</generator><item><title>re: 曾经出现频率最高的笔试题【C/C++ string】之strcpy函数</title><link>http://www.cppblog.com/SINE/archive/2011/04/30/145180.html#145426</link><dc:creator>misserwell</dc:creator><author>misserwell</author><pubDate>Sat, 30 Apr 2011 15:54:00 GMT</pubDate><guid>http://www.cppblog.com/SINE/archive/2011/04/30/145180.html#145426</guid><description><![CDATA[# re: 曾经出现频率最高的笔试题【C/C++ string】之strcpy函数 2011-04-28 21:30 COS <br>@陈昱(CY) <br>直接进行内存拷贝是要高效的多~  回复  更多评论 <br>============================<br><br>可否明示？<img src ="http://www.cppblog.com/SINE/aggbug/145426.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/SINE/" target="_blank">misserwell</a> 2011-04-30 23:54 <a href="http://www.cppblog.com/SINE/archive/2011/04/30/145180.html#145426#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 曾经出现频率最高的笔试题【C/C++ string】之strcpy函数</title><link>http://www.cppblog.com/SINE/archive/2011/04/30/145180.html#145418</link><dc:creator>天堂的隔壁</dc:creator><author>天堂的隔壁</author><pubDate>Sat, 30 Apr 2011 14:37:00 GMT</pubDate><guid>http://www.cppblog.com/SINE/archive/2011/04/30/145180.html#145418</guid><description><![CDATA[@pangzi<br><br>C99 7.21.2.3<br>If copying takes place between objects that<br>overlap, the behavior is undefined.<img src ="http://www.cppblog.com/SINE/aggbug/145418.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/SINE/" target="_blank">天堂的隔壁</a> 2011-04-30 22:37 <a href="http://www.cppblog.com/SINE/archive/2011/04/30/145180.html#145418#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 曾经出现频率最高的笔试题【C/C++ string】之strcpy函数</title><link>http://www.cppblog.com/SINE/archive/2011/04/30/145180.html#145417</link><dc:creator>天堂的隔壁</dc:creator><author>天堂的隔壁</author><pubDate>Sat, 30 Apr 2011 14:35:00 GMT</pubDate><guid>http://www.cppblog.com/SINE/archive/2011/04/30/145180.html#145417</guid><description><![CDATA[git://android.git.kernel.org/platform/bionic.git›<br>libc›<br>string›<br>strcpy.c<br><br>char *<br>strcpy(char *to, const char *from)<br>{<br>        char *save = to;<br><br>        for (; (*to = *from) != '\0'; ++from, ++to);<br>        return(save);<br>}<br><br>看来Google的工程师是得不了多少分的了。<br>1[A]，这个不说了，本来就是有争议的，看各公司的习惯。<br>1[B], strcpy本来是C标准库的一部分，扯到C++显然蛋了。<br>1[C], 提个问题，谁知道NULL在那里定义的？这里反而写0个人感觉是思维严密的表现，他会担心，这里的NULL的定义问题。当然了，如果能#include &lt;stddef.h&gt;就完美了。（C99，Annex B16）但起码比完全不思考的好。直接写NULL也是可以接受的，非上机笔试，潜规则是允许半伪代码。<br>2[A]这个答案太有想象力了。<br>2[B]这个颠覆语言了，更扯蛋了。<br>3[A]难以想象一个正常的人，在return的时候找不到值了，会想不起来…(你可能出门的时候想不起带钥匙，却很难在开门的时候还想不起来。)不过既然是笔试，可能能从行距，有没有插入符号等看出来吧- -<br><br><img src ="http://www.cppblog.com/SINE/aggbug/145417.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/SINE/" target="_blank">天堂的隔壁</a> 2011-04-30 22:35 <a href="http://www.cppblog.com/SINE/archive/2011/04/30/145180.html#145417#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 曾经出现频率最高的笔试题【C/C++ string】之strcpy函数</title><link>http://www.cppblog.com/SINE/archive/2011/04/29/145180.html#145327</link><dc:creator>pangzi</dc:creator><author>pangzi</author><pubDate>Fri, 29 Apr 2011 06:56:00 GMT</pubDate><guid>http://www.cppblog.com/SINE/archive/2011/04/29/145180.html#145327</guid><description><![CDATA[如果两个指针的内存区域有重叠，直接飞掉。<img src ="http://www.cppblog.com/SINE/aggbug/145327.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/SINE/" target="_blank">pangzi</a> 2011-04-29 14:56 <a href="http://www.cppblog.com/SINE/archive/2011/04/29/145180.html#145327#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 曾经出现频率最高的笔试题【C/C++ string】之strcpy函数</title><link>http://www.cppblog.com/SINE/archive/2011/04/28/145180.html#145247</link><dc:creator>COS</dc:creator><author>COS</author><pubDate>Thu, 28 Apr 2011 13:45:00 GMT</pubDate><guid>http://www.cppblog.com/SINE/archive/2011/04/28/145180.html#145247</guid><description><![CDATA[也不用太在意别人的看法，只要自己用的顺手就可以了。再说，这个笔试题分析的也不能说全对，我们只需要从中学习自己认为对的就可以了，至于其他的，也就管不了那么多了@打击装B犯<br><img src ="http://www.cppblog.com/SINE/aggbug/145247.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/SINE/" target="_blank">COS</a> 2011-04-28 21:45 <a href="http://www.cppblog.com/SINE/archive/2011/04/28/145180.html#145247#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 曾经出现频率最高的笔试题【C/C++ string】之strcpy函数</title><link>http://www.cppblog.com/SINE/archive/2011/04/28/145180.html#145246</link><dc:creator>COS</dc:creator><author>COS</author><pubDate>Thu, 28 Apr 2011 13:30:00 GMT</pubDate><guid>http://www.cppblog.com/SINE/archive/2011/04/28/145180.html#145246</guid><description><![CDATA[@陈昱(CY)<br>直接进行内存拷贝是要高效的多~<img src ="http://www.cppblog.com/SINE/aggbug/145246.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/SINE/" target="_blank">COS</a> 2011-04-28 21:30 <a href="http://www.cppblog.com/SINE/archive/2011/04/28/145180.html#145246#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 曾经出现频率最高的笔试题【C/C++ string】之strcpy函数</title><link>http://www.cppblog.com/SINE/archive/2011/04/28/145180.html#145245</link><dc:creator>COS</dc:creator><author>COS</author><pubDate>Thu, 28 Apr 2011 13:28:00 GMT</pubDate><guid>http://www.cppblog.com/SINE/archive/2011/04/28/145180.html#145245</guid><description><![CDATA[@Lo这个是我转的别人的贴，其实我本人也认为没有必要抛出异常的。本身代码就短，还抛出异常，就显得累赘了。<br><br><img src ="http://www.cppblog.com/SINE/aggbug/145245.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/SINE/" target="_blank">COS</a> 2011-04-28 21:28 <a href="http://www.cppblog.com/SINE/archive/2011/04/28/145180.html#145245#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 曾经出现频率最高的笔试题【C/C++ string】之strcpy函数</title><link>http://www.cppblog.com/SINE/archive/2011/04/28/145180.html#145239</link><dc:creator>Lo</dc:creator><author>Lo</author><pubDate>Thu, 28 Apr 2011 10:27:00 GMT</pubDate><guid>http://www.cppblog.com/SINE/archive/2011/04/28/145180.html#145239</guid><description><![CDATA[这里抛出异常是无厘头行为 又不是java  改成assert还说得过去<img src ="http://www.cppblog.com/SINE/aggbug/145239.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/SINE/" target="_blank">Lo</a> 2011-04-28 18:27 <a href="http://www.cppblog.com/SINE/archive/2011/04/28/145180.html#145239#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 曾经出现频率最高的笔试题【C/C++ string】之strcpy函数</title><link>http://www.cppblog.com/SINE/archive/2011/04/28/145180.html#145218</link><dc:creator>TeSe</dc:creator><author>TeSe</author><pubDate>Thu, 28 Apr 2011 06:58:00 GMT</pubDate><guid>http://www.cppblog.com/SINE/archive/2011/04/28/145180.html#145218</guid><description><![CDATA[少一个检查 src 是否等下于des<img src ="http://www.cppblog.com/SINE/aggbug/145218.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/SINE/" target="_blank">TeSe</a> 2011-04-28 14:58 <a href="http://www.cppblog.com/SINE/archive/2011/04/28/145180.html#145218#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 曾经出现频率最高的笔试题【C/C++ string】之strcpy函数</title><link>http://www.cppblog.com/SINE/archive/2011/04/28/145180.html#145211</link><dc:creator>打击装B犯</dc:creator><author>打击装B犯</author><pubDate>Thu, 28 Apr 2011 05:46:00 GMT</pubDate><guid>http://www.cppblog.com/SINE/archive/2011/04/28/145180.html#145211</guid><description><![CDATA[B就是放屁, 历史上不知道有多少代码全都是直接用!来判断的.<br><br><img src ="http://www.cppblog.com/SINE/aggbug/145211.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/SINE/" target="_blank">打击装B犯</a> 2011-04-28 13:46 <a href="http://www.cppblog.com/SINE/archive/2011/04/28/145180.html#145211#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>