{"id":139,"date":"2024-11-14T20:14:15","date_gmt":"2024-11-14T12:14:15","guid":{"rendered":"https:\/\/www.armbian.net\/?p=139"},"modified":"2024-11-17T20:26:58","modified_gmt":"2024-11-17T12:26:58","slug":"139","status":"publish","type":"post","link":"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/139\/","title":{"rendered":"C++"},"content":{"rendered":"<p>\u670d\u52a1\u5668\u81ea\u5e26c++\u73af\u5883\uff0c\u65e0\u9700\u5b89\u88c5\uff01<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center;\">\u6d4b\u8bd5c++\u73af\u5883<\/p>\n<p>\u7f16\u5199\u4e00\u4e2a\u7b80\u5355\u7684c++\u7a0b\u5e8f\u00a0 \u00a0root\u6587\u4ef6\u5939\u4e0b\u65b0\u5efatest.cpp\u6587\u4ef6<\/p>\n<pre class=\"pure-highlightjs line-numbers\"><code class=\"language-cpp\">\/\/ myfirst.cpp--displays a message\r\n \r\n#include &lt;iostream&gt;      \/\/ make definitions visible\r\nusing namespace std;                      \r\nint main()                                    \/\/ function header\r\n{                                             \/\/ start of function body\r\n    cout &lt;&lt; \"Come up and C++ me some time.\";  \/\/ message\r\n    cout &lt;&lt; endl;                             \/\/ start a new line\r\n    cout &lt;&lt; \"You won't regret it!\" &lt;&lt; endl;   \/\/ more output\r\n    return 10;                                 \/\/ terminate main() \u8fd4\u56de\u503c\u4e3a0\u4ee3\u8868\u6210\u529f\uff0c\u975e0\u8fd4\u56de\u503c\u7684\u542b\u4e49\u7531\u7cfb\u7edf\u81ea\u5b9a\u4e49\r\n}                                             \/\/ end of function body\r\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"cpp\"><\/code><\/p>\n<p>\u6253\u5f00\u547d\u4ee4\u7a97\u53e3\u8fdb\u884c\u7f16\u8bd1<\/p>\n<pre class=\"pure-highlightjs line-numbers\"><code class=\"language-shell\">g++ -o test1 test.cpp\r\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>-o test1 test.cpp \u4ecetest.cpp\u7f16\u8bd1\u751f\u6210test1\u6587\u4ef6\uff0ctest1\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u6ca1\u6709\u540e\u7f00<\/p>\n<p>&nbsp;<\/p>\n<p>\u6267\u884c\u53ef\u6267\u884c\u6587\u4ef6<\/p>\n<pre class=\"pure-highlightjs line-numbers\"><code class=\"language-shell\">root@aml:~# .\/test1 \r\nCome up and C++ me some time. \r\nYou won't regret it!\r\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u670d\u52a1\u5668\u81ea\u5e26c++\u73af\u5883\uff0c\u65e0\u9700\u5b89\u88c5\uff01 &nbsp; &nbsp; \u6d4b\u8bd5c++\u73af\u5883 \u7f16\u5199\u4e00\u4e2a\u7b80\u5355\u7684c++\u7a0b\u5e8f\u00a0 \u00a0r [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-139","post","type-post","status-publish","format-standard","hentry","category-5"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>C++ - armbian\u670d\u52a1\u5668\u7cfb\u7edf<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/139\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"C++ - armbian\u670d\u52a1\u5668\u7cfb\u7edf\" \/>\n<meta property=\"og:description\" content=\"\u670d\u52a1\u5668\u81ea\u5e26c++\u73af\u5883\uff0c\u65e0\u9700\u5b89\u88c5\uff01 &nbsp; &nbsp; \u6d4b\u8bd5c++\u73af\u5883 \u7f16\u5199\u4e00\u4e2a\u7b80\u5355\u7684c++\u7a0b\u5e8f\u00a0 \u00a0r [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/139\/\" \/>\n<meta property=\"og:site_name\" content=\"armbian\u670d\u52a1\u5668\u7cfb\u7edf\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-14T12:14:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-17T12:26:58+00:00\" \/>\n<meta name=\"author\" content=\"2668171712\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"2668171712\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/139\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/139\/\"},\"author\":{\"name\":\"2668171712\",\"@id\":\"https:\/\/www.armbian.net\/#\/schema\/person\/6ac5fb3503d4a20a36431ff5b0d3e542\"},\"headline\":\"C++\",\"datePublished\":\"2024-11-14T12:14:15+00:00\",\"dateModified\":\"2024-11-17T12:26:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/139\/\"},\"wordCount\":22,\"publisher\":{\"@id\":\"https:\/\/www.armbian.net\/#\/schema\/person\/6ac5fb3503d4a20a36431ff5b0d3e542\"},\"articleSection\":[\"\u7f16\u7a0b\u8bed\u8a00\u73af\u5883\u5b89\u88c5\"],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/139\/\",\"url\":\"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/139\/\",\"name\":\"C++ - armbian\u670d\u52a1\u5668\u7cfb\u7edf\",\"isPartOf\":{\"@id\":\"https:\/\/www.armbian.net\/#website\"},\"datePublished\":\"2024-11-14T12:14:15+00:00\",\"dateModified\":\"2024-11-17T12:26:58+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/139\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/139\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/139\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.armbian.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"C++\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.armbian.net\/#website\",\"url\":\"https:\/\/www.armbian.net\/\",\"name\":\"armbian\u670d\u52a1\u5668\u7cfb\u7edf\",\"description\":\"armbian \u8ba9\u4e07\u7269\u91cd\u65b0\u91ca\u653e\u4ef7\u503c\uff0c\u4e3a\u4e86\u65e0\u6cd5\u66ff\u4ee3\u7684\u4ef7\u503c\",\"publisher\":{\"@id\":\"https:\/\/www.armbian.net\/#\/schema\/person\/6ac5fb3503d4a20a36431ff5b0d3e542\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.armbian.net\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.armbian.net\/#\/schema\/person\/6ac5fb3503d4a20a36431ff5b0d3e542\",\"name\":\"2668171712\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.armbian.net\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.armbian.net\/wp-content\/uploads\/2023\/03\/cropped-\u5c0f\u73a9\u9b54\u76d2.png\",\"contentUrl\":\"https:\/\/www.armbian.net\/wp-content\/uploads\/2023\/03\/cropped-\u5c0f\u73a9\u9b54\u76d2.png\",\"width\":512,\"height\":512,\"caption\":\"2668171712\"},\"logo\":{\"@id\":\"https:\/\/www.armbian.net\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/www.armbian.net\"],\"url\":\"https:\/\/www.armbian.net\/index.php\/author\/2668171712\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"C++ - armbian\u670d\u52a1\u5668\u7cfb\u7edf","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/139\/","og_locale":"zh_CN","og_type":"article","og_title":"C++ - armbian\u670d\u52a1\u5668\u7cfb\u7edf","og_description":"\u670d\u52a1\u5668\u81ea\u5e26c++\u73af\u5883\uff0c\u65e0\u9700\u5b89\u88c5\uff01 &nbsp; &nbsp; \u6d4b\u8bd5c++\u73af\u5883 \u7f16\u5199\u4e00\u4e2a\u7b80\u5355\u7684c++\u7a0b\u5e8f\u00a0 \u00a0r [&hellip;]","og_url":"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/139\/","og_site_name":"armbian\u670d\u52a1\u5668\u7cfb\u7edf","article_published_time":"2024-11-14T12:14:15+00:00","article_modified_time":"2024-11-17T12:26:58+00:00","author":"2668171712","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"2668171712","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/139\/#article","isPartOf":{"@id":"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/139\/"},"author":{"name":"2668171712","@id":"https:\/\/www.armbian.net\/#\/schema\/person\/6ac5fb3503d4a20a36431ff5b0d3e542"},"headline":"C++","datePublished":"2024-11-14T12:14:15+00:00","dateModified":"2024-11-17T12:26:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/139\/"},"wordCount":22,"publisher":{"@id":"https:\/\/www.armbian.net\/#\/schema\/person\/6ac5fb3503d4a20a36431ff5b0d3e542"},"articleSection":["\u7f16\u7a0b\u8bed\u8a00\u73af\u5883\u5b89\u88c5"],"inLanguage":"zh-Hans"},{"@type":"WebPage","@id":"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/139\/","url":"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/139\/","name":"C++ - armbian\u670d\u52a1\u5668\u7cfb\u7edf","isPartOf":{"@id":"https:\/\/www.armbian.net\/#website"},"datePublished":"2024-11-14T12:14:15+00:00","dateModified":"2024-11-17T12:26:58+00:00","breadcrumb":{"@id":"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/139\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/139\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.armbian.net\/index.php\/2024\/11\/14\/139\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.armbian.net\/"},{"@type":"ListItem","position":2,"name":"C++"}]},{"@type":"WebSite","@id":"https:\/\/www.armbian.net\/#website","url":"https:\/\/www.armbian.net\/","name":"armbian\u670d\u52a1\u5668\u7cfb\u7edf","description":"armbian \u8ba9\u4e07\u7269\u91cd\u65b0\u91ca\u653e\u4ef7\u503c\uff0c\u4e3a\u4e86\u65e0\u6cd5\u66ff\u4ee3\u7684\u4ef7\u503c","publisher":{"@id":"https:\/\/www.armbian.net\/#\/schema\/person\/6ac5fb3503d4a20a36431ff5b0d3e542"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.armbian.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"https:\/\/www.armbian.net\/#\/schema\/person\/6ac5fb3503d4a20a36431ff5b0d3e542","name":"2668171712","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.armbian.net\/#\/schema\/person\/image\/","url":"https:\/\/www.armbian.net\/wp-content\/uploads\/2023\/03\/cropped-\u5c0f\u73a9\u9b54\u76d2.png","contentUrl":"https:\/\/www.armbian.net\/wp-content\/uploads\/2023\/03\/cropped-\u5c0f\u73a9\u9b54\u76d2.png","width":512,"height":512,"caption":"2668171712"},"logo":{"@id":"https:\/\/www.armbian.net\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/www.armbian.net"],"url":"https:\/\/www.armbian.net\/index.php\/author\/2668171712\/"}]}},"views":1347,"_links":{"self":[{"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/posts\/139","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/comments?post=139"}],"version-history":[{"count":7,"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/posts\/139\/revisions"}],"predecessor-version":[{"id":158,"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/posts\/139\/revisions\/158"}],"wp:attachment":[{"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/media?parent=139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/categories?post=139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.armbian.net\/index.php\/wp-json\/wp\/v2\/tags?post=139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}