{"id":9,"date":"2006-04-18T06:30:00","date_gmt":"2006-04-18T10:30:00","guid":{"rendered":"http:\/\/www.cchsu.com\/arthur\/?p=9"},"modified":"2006-09-06T01:33:53","modified_gmt":"2006-09-06T05:33:53","slug":"%e9%9d%a2%e8%a9%a6%e6%ae%ba%e6%89%8b-2","status":"publish","type":"post","link":"http:\/\/www.cchsu.com\/arthur\/2006\/04\/18\/9\/","title":{"rendered":"\u9762\u8a66\u6bba\u624b (2)"},"content":{"rendered":"<div>\u6700\u8fd1\u53c8\u958b\u59cb\u65b0\u4e00\u8f2a\u9762\u8a66\uff0c\u9047\u4e0a\u4e86\u4e00\u4e9b\u6709\u8da3\u7684\u9762\u8a66\u8005\uff0c\u4ed6\u5011\u771f\u7684\u76f4\u63a5\u62d2\u7d55\u5728\u767d\u677f\u4e0a\u5beb\u7a0b\u5f0f\u5594 \ud83d\ude42 \u90a3\u5c31\u6c92\u4ec0\u9ebc\u597d\u8aaa\u7684\uff0c\u6211\u53ea\u597d\u7576\u4ed6\u7b54\u932f\u4e86\u54c7\u54c8\u54c8\u3002<\/p>\n<p> \u70ba\u4e86\u907f\u514d\u6490\u4e0d\u5230\u534a\u500b\u5c0f\u6642\uff0c\u6240\u4ee5\u53c8\u60f3\u4e86\u5e7e\u9053\u984c\u76ee\u3002\u6709\u8da3\u7684\u662f (\u6216\u8005\u8a72\u8aaa\uff0c\u6797\u8001\u5e2b\u5361\u597d\u7684\u662f)\uff0c\u7b54\u5c0d\u7684\u6bd4\u4f8b\u51fa\u5947\u7684\u4f4e\uff01\u4ee5\u4e0b\u662f\u6211\u6700\u8fd1\u7528\u7684\u8003\u984c\uff0c\u9019 &#8230; \u9019\u6703\u592a\u96e3\u55ce\uff1f<\/p>\n<p> 1. \u8acb\u5be6\u4f5c size_t strlen(char*) \u51fd\u6578\u3002<br \/> 2. \u8acb\u5be6\u4f5c int strrchr(const char*, char) \u51fd\u6578\u3002<br \/> 3. \u8acb\u5be6\u4f5c char* reverse(const char*) \u51fd\u6578\uff0c\u5c07\u8f38\u5165\u7684\u5b57\u4e32\u4ee5\u76f8\u53cd\u7684\u9806\u5e8f\u50b3\u56de\uff0c\u5982 &quot;123&quot; \u5c31\u6703\u50b3\u56de &quot;321&quot;<br \/> 4. \u4ec0\u9ebc\u662f namespace\uff1f\u70ba\u4f55\u8981\u6709 namespace\uff1f (\u76f8\u4fe1\u6211\uff0c\u9019\u984c\u5c45\u7136\u4e00\u5806\u4eba\u7b54\u4e0d\u51fa\u4f86 &#8230;)<br \/> 5. \u4ee5\u4e0b\u7684\u7a0b\u5f0f\u7e3d\u5171\u6709\u5e7e\u500b\u932f\u8aa4\uff1f\u70ba\u4ec0\u9ebc\uff1f<\/p>\n<p> #include &lt;iostream&gt;<br \/> using namespace std;<br \/> class A<br \/> {<br \/> &nbsp;&nbsp;&nbsp;&nbsp;A() { cout &nbsp;&nbsp;&nbsp;&nbsp;~A() { cout };<\/p>\n<p> class B: public A<br \/> {<br \/> &nbsp;&nbsp;&nbsp;&nbsp;B() { cout &nbsp;&nbsp;&nbsp;&nbsp;~B() { cout };<\/p>\n<p> int main()<br \/> {<br \/> &nbsp;&nbsp;&nbsp;&nbsp;A* p = new B;<br \/> &nbsp;&nbsp;&nbsp;&nbsp;delete p;<br \/> }<\/p>\n<p> \u6211\u770b\u6211\u9019\u500b\u9762\u8a66\u6bba\u624b\u9084\u8981\u7576\u597d\u4e00\u9663\u5b50 &#8230; \u9019\u5e74\u982d\u5b78\u6821\u4e0d\u6559 C\/C++ \u4e86\u55ce\uff1f<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u53c8\u958b\u59cb\u65b0\u4e00\u8f2a\u9762\u8a66\uff0c\u9047\u4e0a\u4e86\u4e00\u4e9b\u6709\u8da3\u7684\u9762\u8a66\u8005\uff0c\u4ed6\u5011\u771f\u7684\u76f4\u63a5\u62d2\u7d55\u5728\u767d\u677f\u4e0a\u5beb\u7a0b\u5f0f\u5594 \ud83d\ude42 \u90a3\u5c31\u6c92\u4ec0\u9ebc\u597d\u8aaa\u7684\uff0c\u6211\u53ea\u597d\u7576\u4ed6\u7b54\u932f\u4e86\u54c7\u54c8\u54c8\u3002 \u70ba\u4e86\u907f\u514d\u6490\u4e0d\u5230\u534a\u500b\u5c0f\u6642\uff0c\u6240\u4ee5\u53c8\u60f3\u4e86\u5e7e\u9053\u984c\u76ee\u3002\u6709\u8da3\u7684\u662f (\u6216\u8005\u8a72\u8aaa\uff0c\u6797\u8001\u5e2b\u5361\u597d\u7684\u662f)\uff0c\u7b54\u5c0d\u7684\u6bd4\u4f8b\u51fa\u5947\u7684\u4f4e\uff01\u4ee5\u4e0b\u662f\u6211\u6700\u8fd1\u7528\u7684\u8003\u984c\uff0c\u9019 &#8230; \u9019\u6703\u592a\u96e3\u55ce\uff1f 1. \u8acb\u5be6\u4f5c size_t strlen(char*) \u51fd\u6578\u3002 2. \u8acb\u5be6\u4f5c int strrchr(const char*, char) \u51fd\u6578\u3002 3. \u8acb\u5be6\u4f5c char* reverse(const char*) \u51fd\u6578\uff0c\u5c07\u8f38\u5165\u7684\u5b57\u4e32\u4ee5\u76f8\u53cd\u7684\u9806\u5e8f\u50b3\u56de\uff0c\u5982 &quot;123&quot; \u5c31\u6703\u50b3\u56de &quot;321&quot; 4. \u4ec0\u9ebc\u662f namespace\uff1f\u70ba\u4f55\u8981\u6709 namespace\uff1f (\u76f8\u4fe1\u6211\uff0c\u9019\u984c\u5c45\u7136\u4e00\u5806\u4eba\u7b54\u4e0d\u51fa\u4f86 &#8230;) 5. \u4ee5\u4e0b\u7684\u7a0b\u5f0f\u7e3d\u5171\u6709\u5e7e\u500b\u932f\u8aa4\uff1f\u70ba\u4ec0\u9ebc\uff1f #include &lt;iostream&gt; using namespace std; class A { &nbsp;&nbsp;&nbsp;&nbsp;A() { cout &nbsp;&nbsp;&nbsp;&nbsp;~A() { cout }; class B: public A [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,5],"tags":[],"_links":{"self":[{"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/posts\/9"}],"collection":[{"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/comments?post=9"}],"version-history":[{"count":0,"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/posts\/9\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/media?parent=9"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/categories?post=9"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/tags?post=9"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}