{"id":1168,"date":"2022-01-04T10:48:19","date_gmt":"2022-01-04T02:48:19","guid":{"rendered":"http:\/\/139.9.1.231\/?p=1168"},"modified":"2022-01-04T10:48:21","modified_gmt":"2022-01-04T02:48:21","slug":"c1","status":"publish","type":"post","link":"http:\/\/139.9.1.231\/index.php\/2022\/01\/04\/c1\/","title":{"rendered":"c++ \u5165\u95e8"},"content":{"rendered":"\n<p>         \u672c\u79d1\u5927\u4e00\u7684\u65f6\u5019\u5b66\u4e60\u8fc7c++\uff0c\u4f46\u56e0\u4e3a\u540e\u6765\u5927\u90e8\u5206\u9879\u76ee\u90fd\u662f\u7528python\uff0c\u6240\u4ee5\u57fa\u672c\u4e0a\u90fd\u8fd8\u7ed9\u8001\u5e08\u4e86\uff0c\u4f46\u5176\u5b9e\u56de\u8fc7\u5934\u53d1\u73b0\uff0c\u5f88\u591apython\u5f00\u6e90\u5e93\u90fd\u662f\u7528c++\u5199\u7684\uff0c\u50cfopencv\uff0c\u56e0\u6b64\u5f88\u6709\u5fc5\u8981\u53bb\u5728\u56de\u987e\u4e00\u4e0b\u5b50c++\u7684\u57fa\u672c\u6982\u5ff5\u3002<\/p>\n\n\n<div class=\"wp-block-calendar\"><table id=\"wp-calendar\" class=\"wp-calendar-table\">\n\t<caption>2026\u5e74 4\u6708<\/caption>\n\t<thead>\n\t<tr>\n\t\t<th scope=\"col\" title=\"\u661f\u671f\u4e00\">\u4e00<\/th>\n\t\t<th scope=\"col\" title=\"\u661f\u671f\u4e8c\">\u4e8c<\/th>\n\t\t<th scope=\"col\" title=\"\u661f\u671f\u4e09\">\u4e09<\/th>\n\t\t<th scope=\"col\" title=\"\u661f\u671f\u56db\">\u56db<\/th>\n\t\t<th scope=\"col\" title=\"\u661f\u671f\u4e94\">\u4e94<\/th>\n\t\t<th scope=\"col\" title=\"\u661f\u671f\u516d\">\u516d<\/th>\n\t\t<th scope=\"col\" title=\"\u661f\u671f\u65e5\">\u65e5<\/th>\n\t<\/tr>\n\t<\/thead>\n\t<tbody>\n\t<tr>\n\t\t<td colspan=\"2\" class=\"pad\">&nbsp;<\/td><td>1<\/td><td>2<\/td><td>3<\/td><td>4<\/td><td>5<\/td>\n\t<\/tr>\n\t<tr>\n\t\t<td id=\"today\">6<\/td><td>7<\/td><td>8<\/td><td>9<\/td><td>10<\/td><td>11<\/td><td>12<\/td>\n\t<\/tr>\n\t<tr>\n\t\t<td>13<\/td><td>14<\/td><td>15<\/td><td>16<\/td><td>17<\/td><td>18<\/td><td>19<\/td>\n\t<\/tr>\n\t<tr>\n\t\t<td>20<\/td><td>21<\/td><td>22<\/td><td>23<\/td><td>24<\/td><td>25<\/td><td>26<\/td>\n\t<\/tr>\n\t<tr>\n\t\t<td>27<\/td><td>28<\/td><td>29<\/td><td>30<\/td>\n\t\t<td class=\"pad\" colspan=\"3\">&nbsp;<\/td>\n\t<\/tr>\n\t<\/tbody>\n\t<\/table><nav aria-label=\"\u4e0a\u4e2a\u6708\u53ca\u4e0b\u4e2a\u6708\" class=\"wp-calendar-nav\">\n\t\t<span class=\"wp-calendar-nav-prev\"><a href=\"http:\/\/139.9.1.231\/index.php\/2026\/03\/\">&laquo; 3\u6708<\/a><\/span>\n\t\t<span class=\"pad\">&nbsp;<\/span>\n\t\t<span class=\"wp-calendar-nav-next\">&nbsp;<\/span>\n\t<\/nav><\/div>\n\n\n<ol start=\"1\" class=\"has-light-gray-background-color has-background\"><li>c++\u6ce8\u91ca <\/li><\/ol>\n\n\n\n<p>\u4ee5\u53cc\u659c\u6760\u5f00\u5934\uff1a \/\/\u8fd9\u662f\u4e00\u884c\u6ce8\u91ca\uff0cc++\u4e5f\u80fd\u8bc6\u522bc\u6ce8\u91ca\uff0cc\u6ce8\u91ca\u5305\u62ec\u5728\u7b26\u53f7\/*  *\/\u4e4b\u95f4\uff0c\u53ef\u4ee5\u8de8\u8d8a\u591a\u884c\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;iostream>  \r\nint main (){  \r\n#c++ \u4f8b\u5b50  \r\n    usinng namespace std;  \r\n    cout&lt;&lt;\"hello world\"  \r\n    cout&lt;&lt;endl;  \r\n    return 0  \r\n}  <\/code><\/pre>\n\n\n\n<ol start=\"2\" class=\"has-light-gray-background-color has-background\"><li>\u9884\u5904\u7406\u5668\u548ciostream<\/li><\/ol>\n\n\n\n<p> #include &lt;iostream> <\/p>\n\n\n\n<ol start=\"3\" class=\"has-light-gray-background-color has-background\"><li>\u5934\u6587\u4ef6\u548c\u547d\u540d\u7a7a\u95f4<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><img loading=\"lazy\" width=\"1024\" height=\"324\" src=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/01\/image-22-1024x324.png\" alt=\"\" class=\"wp-image-1174\" srcset=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/01\/image-22-1024x324.png 1024w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/01\/image-22-300x95.png 300w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/01\/image-22-768x243.png 768w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/01\/image-22.png 1241w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u5982\u679c\u4f7f\u7528iostream\uff0c\u800c\u4e0d\u662fiostream.h\uff0c\u5219\u5e94\u4f7f\u7528\u4e0b\u9762\u7684\u540d\u79f0\u7a7a\u95f4\u7f16\u8bd1\u6307\u4ee4\u6765\u4f7fiostream\u4e2d\u7684\u5b9a\u4e49\u5bf9\u7a0b\u5e8f\u53ef\u7528\uff1a using namespace std\uff1b<\/p>\n\n\n\n<p>\u547d\u540d\u7a7a\u95f4\u4f5c\u7528\uff1a\u5047\u5982\u4e24\u4e2a\u5c01\u88c5\u597d\u7684\u5e93\uff0c\u90fd\u6709\u540d\u4e3acout\u7684\u51fd\u6570\uff0c\u90a3\u4e48\u5728\u8c03\u7528cout\u65f6\uff0c\u7f16\u8bd1\u5668\u4e0d\u77e5\u9053\u662f\u54ea\u4e2a\u51fd\u6570\uff0c\u56e0\u6b64\u53ef\u4ee5\u628a\u67d0\u4e2a\u5e93\u4e2d\u51fd\u6570\u5b9a\u4e49\u5230\u4e00\u4e2a\u547d\u540d\u7a7a\u95f4\uff0c\u5c31\u53ef\u4ee5\u901a\u8fc7 std:cout  (\u547d\u540d\u7a7a\u95f4:\u51fd\u6570\u540d)\u8c03\u7528\uff0c\u6b64\u5916\uff0c\u8fd9\u6837\u5199\u6bd4\u8f83\u9ebb\u70e6\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528using\uff0c\u800c\u4e0d\u5fc5\u4f7f\u7528std\u524d\u7f00 \uff1a  using namespace std \uff1b\u4f7f\u5f97std\u4e2d\u6240\u6709\u540d\u79f0\u53ef\u7528\u3002\u5728\u5927\u578b\u5de5\u7a0b\u4e2d\uff0c\u4e00\u822c\u4f7f\u7528\uff1ausing std:cout; using std:cin;\u5355\u72ec\u5b9a\u4e49\u6240\u9700\u7684\u51fd\u6570<\/p>\n\n\n\n<ol start=\"4\" class=\"has-light-gray-background-color has-background\"><li>\u8f93\u5165\u8f93\u51fa<\/li><\/ol>\n\n\n\n<p>cout&lt;&lt;&#8220;hello&#8221;   \u548c cin&lt;&lt;a    cout \u8fd8\u53ef\u4ee5\u62fc\u63a5 cout&lt;&lt;&#8220;s&#8221;&lt;&lt;&#8220;v&#8221;&lt;&lt;endl;<\/p>\n\n\n\n<p>endl \u662f\u4e00\u4e2a\u7279\u6b8a\u7684c++\u7b26\u53f7\uff0c\u8868\u793a\u6362\u884c\uff0c\u6b64\u5916\u8fd8\u53ef\u4ee5\u4f7f\u7528c\u4e2d\u7684\\n\u6362\u884c\u7b26 cout&lt;&lt;&#8220;hello \\n&#8221;<\/p>\n\n\n\n<ol start=\"5\" class=\"has-light-gray-background-color has-background\"><li>\u58f0\u660e\u8bed\u53e5\u548c\u53d8\u91cf<\/li><\/ol>\n\n\n\n<p>int carrots;     \u8fd9\u6761\u8bed\u53e5\u58f0\u660e\u4e86\u9700\u8981\u7684\u5185\u5b58\u548c\u5185\u5b58\u5355\u5143\u540d\u79f0.\u4e3a\u4ec0\u4e48\u9700\u8981\u58f0\u660e\u53d8\u91cf\uff1a\u5982\u679c\u4e0d\u663e\u793a\u7684\u58f0\u660e\uff0c\u90a3\u4e48\u5f53\u6211\u4eec\u5728\u591a\u6b21\u4f7f\u7528 carrots \u53d8\u91cf\u65f6\u5019\uff0c\u5982\u679c\u4e2d\u95f4\u6709\u4e2a\u5199\u9519\u4e86  carrot \uff0c\u7cfb\u7edf\u4e0d\u4f1a\u62a5\u9519\uff0c\u800c\u662f\u8ba4\u4e3a\u8fd9\u662f\u4e00\u4e2a\u65b0\u7684\u53d8\u91cf\u3002<\/p>\n\n\n\n<p>\u53d8\u91cf\u8d4b\u503c a=3<\/p>\n\n\n\n<ol start=\"6\" class=\"has-light-gray-background-color has-background\"><li>\u51fd\u6570<\/li><\/ol>\n\n\n\n<p>type functionname(argumentlist){ statements }<\/p>\n\n\n\n<p>\u51fd\u6570\u5934\uff1a  type functionname(argumentlist) \uff0c\u51fd\u6570\u4e2d\u53ef\u4ee5\u4f7f\u7528using\u7f16\u8bd1\u6307\u4ee4\uff0c\u8d77\u4f5c\u7528\u8303\u56f4\u4e3a\u51fd\u6570\u5185\u90e8\u3002<\/p>\n\n\n\n<p>\u5982\u679cusing \u653e\u7f6e\u5728\u51fd\u6570\u5b9a\u4e49\u4e4b\u524d\uff0c\u6587\u4ef6\u4e2d\u6240\u6709\u7684\u51fd\u6570\u90fd\u53ef\u4ee5\u4f7f\u7528std\u4e2d\u7684\u5143\u7d20\uff0cusing\u653e\u5728\u7279\u5b9a\u51fd\u6570\u4e2d\uff0c\u5219\u8be5\u51fd\u6570\u80fd\u4f7f\u7528<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u79d1\u5927\u4e00\u7684\u65f6\u5019\u5b66\u4e60\u8fc7c++\uff0c\u4f46\u56e0\u4e3a\u540e\u6765\u5927\u90e8\u5206\u9879\u76ee\u90fd\u662f\u7528python\uff0c\u6240\u4ee5\u57fa\u672c\u4e0a\u90fd\u8fd8\u7ed9\u8001\u5e08\u4e86\uff0c\u4f46\u5176\u5b9e\u56de\u8fc7\u5934\u53d1\u73b0\uff0c &hellip; <a href=\"http:\/\/139.9.1.231\/index.php\/2022\/01\/04\/c1\/\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">c++ \u5165\u95e8<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[14],"tags":[],"_links":{"self":[{"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/posts\/1168"}],"collection":[{"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/comments?post=1168"}],"version-history":[{"count":12,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/posts\/1168\/revisions"}],"predecessor-version":[{"id":1181,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/posts\/1168\/revisions\/1181"}],"wp:attachment":[{"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/media?parent=1168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/categories?post=1168"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/tags?post=1168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}