﻿<?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++博客-昵称不能为空-随笔分类-C++ 学习笔记</title><link>http://www.cppblog.com/HelloCpp/category/11434.html</link><description /><language>zh-cn</language><lastBuildDate>Sat, 28 Nov 2009 11:43:24 GMT</lastBuildDate><pubDate>Sat, 28 Nov 2009 11:43:24 GMT</pubDate><ttl>60</ttl><item><title>加速素数生产算法</title><link>http://www.cppblog.com/HelloCpp/archive/2009/11/28/102136.html</link><dc:creator>HellpCpp</dc:creator><author>HellpCpp</author><pubDate>Sat, 28 Nov 2009 01:24:00 GMT</pubDate><guid>http://www.cppblog.com/HelloCpp/archive/2009/11/28/102136.html</guid><wfw:comment>http://www.cppblog.com/HelloCpp/comments/102136.html</wfw:comment><comments>http://www.cppblog.com/HelloCpp/archive/2009/11/28/102136.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/HelloCpp/comments/commentRss/102136.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/HelloCpp/services/trackbacks/102136.html</trackback:ping><description><![CDATA[<p>#include &lt;stdio.h&gt;<br>int prime(int);<br>int prime1(int);<br>#define z 1000<br>int x[z],xc =1;<br>main()<br>{<br>&nbsp;/*<br>&nbsp;int i;<br>&nbsp;for(i =2; i &lt;= z; i++)<br>&nbsp;{<br>&nbsp;&nbsp;if( prime(i))<br>&nbsp;&nbsp;&nbsp;printf("%6d",i);<br>&nbsp;}<br>*/<br>&nbsp;int i;x[0] = 2;<br>&nbsp;printf("%6d",2);<br>&nbsp;for( i = 3; i &lt;= z; i++)<br>&nbsp;{<br>&nbsp;&nbsp;if(prime1(i))<br>&nbsp;&nbsp;&nbsp;printf("%6d",i);<br>&nbsp;}</p>
<p>}</p>
<p>int prime(int n)<br>{<br>&nbsp;int i,bound;<br>&nbsp;if( n % 2 == 0 ) <br>&nbsp;&nbsp;return ( n == 2 );<br>&nbsp;if( n % 3 == 0 )<br>&nbsp;&nbsp;return ( n == 3 );<br>&nbsp;if( n % 5 == 0 )<br>&nbsp;&nbsp;return ( n == 5 );<br>&nbsp;for(i = 7; i*i &lt; n; i+=2)<br>&nbsp;&nbsp;if( n % i == 0)<br>&nbsp;&nbsp;&nbsp;return 0;<br>&nbsp;return 1;<br>}</p>
<p>int prime1(int n)<br>{<br>&nbsp;int k;<br>&nbsp;for (k = 0; x[k]*x[k] &lt;= n; k++)<br>&nbsp;&nbsp;if(n % x[k] == 0)<br>&nbsp;&nbsp;&nbsp;return 0;<br>&nbsp;x[xc++] = n;<br>&nbsp;return 1;<br>}<br><br>//摘自&lt;编程珠玑2&gt;</p>
<img src ="http://www.cppblog.com/HelloCpp/aggbug/102136.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/HelloCpp/" target="_blank">HellpCpp</a> 2009-11-28 09:24 <a href="http://www.cppblog.com/HelloCpp/archive/2009/11/28/102136.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>C++拷贝构造函数的几个细节（转）</title><link>http://www.cppblog.com/HelloCpp/archive/2009/08/18/93749.html</link><dc:creator>HellpCpp</dc:creator><author>HellpCpp</author><pubDate>Tue, 18 Aug 2009 15:46:00 GMT</pubDate><guid>http://www.cppblog.com/HelloCpp/archive/2009/08/18/93749.html</guid><wfw:comment>http://www.cppblog.com/HelloCpp/comments/93749.html</wfw:comment><comments>http://www.cppblog.com/HelloCpp/archive/2009/08/18/93749.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/HelloCpp/comments/commentRss/93749.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/HelloCpp/services/trackbacks/93749.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;<a href='http://www.cppblog.com/HelloCpp/archive/2009/08/18/93749.html'>阅读全文</a><img src ="http://www.cppblog.com/HelloCpp/aggbug/93749.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/HelloCpp/" target="_blank">HellpCpp</a> 2009-08-18 23:46 <a href="http://www.cppblog.com/HelloCpp/archive/2009/08/18/93749.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>复制构造函数和重载赋值操作符(转)</title><link>http://www.cppblog.com/HelloCpp/archive/2009/08/18/93747.html</link><dc:creator>HellpCpp</dc:creator><author>HellpCpp</author><pubDate>Tue, 18 Aug 2009 15:36:00 GMT</pubDate><guid>http://www.cppblog.com/HelloCpp/archive/2009/08/18/93747.html</guid><wfw:comment>http://www.cppblog.com/HelloCpp/comments/93747.html</wfw:comment><comments>http://www.cppblog.com/HelloCpp/archive/2009/08/18/93747.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/HelloCpp/comments/commentRss/93747.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/HelloCpp/services/trackbacks/93747.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;<a href='http://www.cppblog.com/HelloCpp/archive/2009/08/18/93747.html'>阅读全文</a><img src ="http://www.cppblog.com/HelloCpp/aggbug/93747.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/HelloCpp/" target="_blank">HellpCpp</a> 2009-08-18 23:36 <a href="http://www.cppblog.com/HelloCpp/archive/2009/08/18/93747.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>C++友元机制来源与规则</title><link>http://www.cppblog.com/HelloCpp/archive/2009/08/17/93561.html</link><dc:creator>HellpCpp</dc:creator><author>HellpCpp</author><pubDate>Mon, 17 Aug 2009 02:15:00 GMT</pubDate><guid>http://www.cppblog.com/HelloCpp/archive/2009/08/17/93561.html</guid><wfw:comment>http://www.cppblog.com/HelloCpp/comments/93561.html</wfw:comment><comments>http://www.cppblog.com/HelloCpp/archive/2009/08/17/93561.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/HelloCpp/comments/commentRss/93561.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/HelloCpp/services/trackbacks/93561.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;<a href='http://www.cppblog.com/HelloCpp/archive/2009/08/17/93561.html'>阅读全文</a><img src ="http://www.cppblog.com/HelloCpp/aggbug/93561.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/HelloCpp/" target="_blank">HellpCpp</a> 2009-08-17 10:15 <a href="http://www.cppblog.com/HelloCpp/archive/2009/08/17/93561.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>