{"id":157,"date":"2014-07-05T15:54:41","date_gmt":"2014-07-05T07:54:41","guid":{"rendered":"http:\/\/www.fuheicat.com\/?p=157"},"modified":"2014-08-14T12:20:10","modified_gmt":"2014-08-14T04:20:10","slug":"%e8%85%b9%e9%bb%91%e7%8c%ab%e8%b7%9f%e4%bd%a0%e4%b8%80%e8%b5%b7%e5%ad%a6c1-helloworld%ef%bc%81","status":"publish","type":"post","link":"https:\/\/www.fuheicat.com\/?p=157","title":{"rendered":"\u8179\u9ed1\u732b\u8ddf\u4f60\u4e00\u8d77\u5b66C++(1)\u2014\u2014Hello,world\uff01"},"content":{"rendered":"<p>\u6211\u4e5f\u521a\u5f00\u59cb\u5b66\u554a\u2026\u2026\u6c34\u5e73\u4e0d\u591f\u2026\u2026\u5199\u7684\u4e0d\u597d\u7684\u8bdd\u2026\u2026<del datetime=\"2014-07-05T07:08:59+00:00\">\u4f60\u6765\u6253\u6211\u554a\uff01<\/del> <del>\u6069\u5f88\u6709\u53ef\u80fd\u6211\u5199\u7740\u5199\u7740\u5c31\u5751\u4e86\uff0c\u800c\u4e14\u6211\u6709\u53ef\u80fd\u628a\u4f60\u62d0\u6c9f\u91cc\u53bb\u3002<\/del><br \/>\n\u597d\u7684\u6211\u4eec\u6765\u770b\u5927\u540d\u9f0e\u9f0e\u7684Hello\uff0cworld\uff01<br \/>\n<!--more--><\/p>\n<pre class=\"theme:ado lang:c++ decode:true\">\/\/Hello,world\r\n#include &lt;iostream&gt;\r\nusing namespace std;\r\nint main () {\r\n    cout&lt;&lt;\"Hello,world!\\n\";\r\n    return 0;\r\n}<\/pre>\n<h4>\u4e0b\u9762\u6211\u4eec\u4e00\u53e5\u4e00\u53e5\u5206\u6790\u5427~<br \/>\n\u2460\/\/<\/h4>\n<p>\/\/\u540e\u4e3a\u6ce8\u91ca\uff0c\u7f16\u8bd1\u8fd0\u884c\u7684\u65f6\u5019\u4f1a\u81ea\u52a8\u5ffd\u7565\u3002\u6ce8\u91ca\u6709\u52a9\u4e8e\u9605\u8bfb\u7a0b\u5e8f\uff0c\u5199\u6ce8\u91ca\u4e5f\u662f\u4e00\u4e2a\u597d\u4e60\u60ef\u3002<del>\uff08\u867d\u7136\u6211\u57fa\u672c\u4e0a\u6ca1\u5199\u8fc7\u3002\uff09<\/del><\/p>\n<h4>\u2461#include &lt;iostream&gt;<\/h4>\n<p>\u8fd9\u53e5\u5e76\u4e0d\u662f\u53ef\u6267\u884c\u4ee3\u7801\uff0c\u800c\u662f\u9884\u5904\u7406\u5668\u7684\u6307\u793a\u8bed\u53e5<del>\uff08\u8bf6\uff0c\u4f60\u95ee\u6211\u8fd9\u662f\u4ec0\u4e48\u4e1c\u897f\uff1f\u4f60\u731c\u554a\uff01\uff09\u3002<\/del>\u5305\u542biostream\u8fd9\u4e2a\u5934\u6587\u4ef6\u3002iostream\u4e3a<span style=\"color: #ff0000;\">input output stream<\/span>\u7684\u7f29\u5199\uff0c\u610f\u601d\u4e3a\u6807\u51c6\u7684\u8f93\u5165\u8f93\u51fa\u6d41\u5934\u6587\u4ef6\uff0c\u4e0a\u9762\u7528\u5230\u7684cout&lt;&lt;\u201c\u201d;\u5c31\u88ab\u5305\u542b\u5728\u8fd9\u4e2a\u5934\u6587\u4ef6\u4e2d\u3002\uff08cout\u4e3a\u8f93\u51fa\uff0ccin&gt;&gt;\u4e3a\u8f93\u5165\u3002\uff09<\/p>\n<h4>\u2462using namespace std;<\/h4>\n<p><span style=\"color: #333333;\">namespace\u662f\u6307\u6807\u8bc6\u7b26\u7684\u5404\u79cd\u53ef\u89c1\u8303\u56f4\u3002\u547d\u540d\u7a7a\u95f4\u7528\u5173\u952e\u5b57namespace \u6765\u5b9a\u4e49\u3002\u547d\u540d\u7a7a\u95f4\u662fC++\u7684\u4e00\u79cd\u673a\u5236\uff0c\u7528\u6765\u628a\u5355\u4e2a\u6807\u8bc6\u7b26\u4e0b\u7684\u5927\u91cf\u6709\u903b\u8f91\u8054\u7cfb\u7684\u7a0b\u5e8f\u5b9e\u4f53\u7ec4\u5408\u5230\u4e00\u8d77\u3002\u6b64\u6807\u8bc6\u7b26\u4f5c\u4e3a\u6b64\u7ec4\u7fa4\u7684\u540d\u5b57\u3002<\/span><\/p>\n<h4>\u2463int main () {\u2026\u2026}<\/h4>\n<p>\u58f0\u660e\u4e3b\u51fd\u6570\uff0c\u6bcf\u4e2aC++\u7a0b\u5e8f\u90fd\u4f1a\u6709\u4e00\u4e2amain\u51fd\u6570\uff0c\u7a0b\u5e8f\u4e5f\u662f\u6700\u5148\u4ece\u8fd9\u91cc\u6267\u884c\u3002\u524d\u9762\u7684int\uff08integer\uff0c\u6574\u578b\uff0c<span style=\"color: #333333;\">-2147483648 ~ +2147483647\u00a0\u00a0 (4 Bytes)<\/span>\uff09\u4e3a\u8fd4\u56de\u503c\u7c7b\u578b\uff0c\u6b63\u56e0\u4e3a\u8fd9\u91cc\u6709\u4e86\u8fd4\u56de\u503c\uff0c\u6240\u4ee5\u4e0b\u9762\u6709\u4e00\u53e5return 0;\uff08\u8fd4\u56de 0\uff09<\/p>\n<h4>\u2464cout&lt;&lt;&#8220;Hello,world!\\n&#8221;;<\/h4>\n<p>\u8f93\u51fa&#8221;Hello,world!&#8221;\u3002\u6ce8\u610f\u8981\u7528\u82f1\u6587\u53cc\u5f15\u53f7\u62ec\u8d77\u6765\uff0c\u8868\u660e\u5b83\u662f\u5b57\u7b26\u4e32\u7c7b\u578b\u3002\uff08&#8221;\\n&#8221;\u4e3a\u6362\u884c\u7b26\uff0c\u66f4\u591a\u8bf7\u67e5\u770b\u4e0b\u9762\u7684\u53c2\u8003\u8d44\u6599\u3002\uff09 <span style=\"color: #339966;\">Tips:\u2460\u6bcf\u4e00\u4e2a\u8bed\u53e5\u4e4b\u540e\u4e0d\u8981\u5fd8\u4e86\u52a0\u5206\u53f7(;)\u2461\u51fd\u6570\u4e2d\u7684\u8bed\u53e5\u7ec4\u8981\u7528\u82b1\u62ec\u53f7({})\u62ec\u8d77\u6765\u3002<\/span><\/p>\n<h4><strong>\u53c2\u8003\u8d44\u6599\uff1a<\/strong><\/h4>\n<table class=\"table-view log-set-param \" style=\"color: #333333;\">\n<tbody>\n<tr>\n<td>\u8f6c\u4e49\u5b57\u7b26<\/td>\n<td>\u610f\u4e49<\/td>\n<td>ASCII\u7801\u503c\uff08\u5341\u8fdb\u5236\uff09<\/td>\n<\/tr>\n<tr>\n<td>\\a<\/td>\n<td>\u54cd\u94c3(BEL)<\/td>\n<td>007<\/td>\n<\/tr>\n<tr>\n<td>\\b<\/td>\n<td>\u9000\u683c(BS) \uff0c\u5c06\u5f53\u524d\u4f4d\u7f6e\u79fb\u5230\u524d\u4e00\u5217<\/td>\n<td>008<\/td>\n<\/tr>\n<tr>\n<td>\\f<\/td>\n<td>\u6362\u9875(FF)\uff0c\u5c06\u5f53\u524d\u4f4d\u7f6e\u79fb\u5230\u4e0b\u9875\u5f00\u5934<\/td>\n<td>012<\/td>\n<\/tr>\n<tr>\n<td>\\n<\/td>\n<td>\u6362\u884c(LF) \uff0c\u5c06\u5f53\u524d\u4f4d\u7f6e\u79fb\u5230\u4e0b\u4e00\u884c\u5f00\u5934<\/td>\n<td>010<\/td>\n<\/tr>\n<tr>\n<td>\\r<\/td>\n<td>\u56de\u8f66(CR) \uff0c\u5c06\u5f53\u524d\u4f4d\u7f6e\u79fb\u5230\u672c\u884c\u5f00\u5934<\/td>\n<td>013<\/td>\n<\/tr>\n<tr>\n<td>\\t<\/td>\n<td>\u6c34\u5e73\u5236\u8868(HT) \uff08\u8df3\u5230\u4e0b\u4e00\u4e2aTAB\u4f4d\u7f6e\uff09<\/td>\n<td>009<\/td>\n<\/tr>\n<tr>\n<td>\\v<\/td>\n<td>\u5782\u76f4\u5236\u8868(VT)<\/td>\n<td>011<\/td>\n<\/tr>\n<tr>\n<td>\\\\<\/td>\n<td>\u4ee3\u8868\u4e00\u4e2a\u53cd\u659c\u7ebf\u5b57\u7b26&#8221;\\&#8217;<\/td>\n<td>092<\/td>\n<\/tr>\n<tr>\n<td>\\&#8217;<\/td>\n<td>\u4ee3\u8868\u4e00\u4e2a\u5355\u5f15\u53f7\uff08\u6487\u53f7\uff09\u5b57\u7b26<\/td>\n<td>039<\/td>\n<\/tr>\n<tr>\n<td>\\&#8221;<\/td>\n<td>\u4ee3\u8868\u4e00\u4e2a\u53cc\u5f15\u53f7\u5b57\u7b26<\/td>\n<td>034<\/td>\n<\/tr>\n<tr>\n<td>\\0<\/td>\n<td>\u7a7a\u5b57\u7b26(NULL)<\/td>\n<td>000<\/td>\n<\/tr>\n<tr>\n<td>\\ddd<\/td>\n<td>1\u52303\u4f4d\u516b\u8fdb\u5236\u6570\u6240\u4ee3\u8868\u7684\u4efb\u610f\u5b57\u7b26<\/td>\n<td>\u4e09\u4f4d\u516b\u8fdb\u5236<\/td>\n<\/tr>\n<tr>\n<td>\\xhh<\/td>\n<td>1\u52302\u4f4d\u5341\u516d\u8fdb\u5236\u6240\u4ee3\u8868\u7684\u4efb\u610f\u5b57\u7b26<\/td>\n<td>\u4e8c\u4f4d\u5341\u516d\u8fdb\u5236<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h6>\u5982\u679c\u4f60\u6709\u4ec0\u4e48\u610f\u89c1\u5efa\u8bae\u6216\u53d1\u73b0\u4e86\u4ec0\u4e48\u9519\u8bef\uff0c\u8bf7\u5728\u4e0b\u65b9\u7559\u8a00\u6216\u7ed9\u6211\u53d1\u90ae\u4ef6\u54e6\u3002\u90ae\u7bb1\uff1a18340730@qq.com<\/h6>\n<h6>\u611f\u8c22<a href=\"http:\/\/shuenhoy.com\">@Shuenhoy<\/a>\u7684\u5e2e\u52a9<\/h6>\n","protected":false},"excerpt":{"rendered":"<p>\u6211\u4e5f\u521a\u5f00\u59cb\u5b66\u554a\u2026\u2026\u6c34\u5e73\u4e0d\u591f\u2026\u2026\u5199\u7684\u4e0d\u597d\u7684\u8bdd\u2026\u2026\u4f60\u6765\u6253\u6211\u554a\uff01 \u6069\u5f88\u6709\u53ef\u80fd\u6211\u5199\u7740\u5199\u7740\u5c31\u5751\u4e86\uff0c\u800c\u4e14\u6211\u6709\u53ef\u80fd\u628a\u4f60\u62d0\u6c9f\u91cc [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-157","post","type-post","status-publish","format-standard","hentry","category-essay"],"_links":{"self":[{"href":"https:\/\/www.fuheicat.com\/index.php?rest_route=\/wp\/v2\/posts\/157","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fuheicat.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fuheicat.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fuheicat.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fuheicat.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=157"}],"version-history":[{"count":20,"href":"https:\/\/www.fuheicat.com\/index.php?rest_route=\/wp\/v2\/posts\/157\/revisions"}],"predecessor-version":[{"id":256,"href":"https:\/\/www.fuheicat.com\/index.php?rest_route=\/wp\/v2\/posts\/157\/revisions\/256"}],"wp:attachment":[{"href":"https:\/\/www.fuheicat.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=157"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fuheicat.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=157"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fuheicat.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=157"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}