{"id":21253,"date":"2024-11-19T17:38:45","date_gmt":"2024-11-19T09:38:45","guid":{"rendered":"https:\/\/fwq.ai\/blog\/21253\/"},"modified":"2024-11-19T17:38:45","modified_gmt":"2024-11-19T09:38:45","slug":"vscode%e5%a6%82%e4%bd%95%e5%9c%a8%e7%bb%88%e7%ab%af%e8%bf%90%e8%a1%8c%e7%a8%8b%e5%ba%8f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/21253\/","title":{"rendered":"vscode\u5982\u4f55\u5728\u7ec8\u7aef\u8fd0\u884c\u7a0b\u5e8f"},"content":{"rendered":"<blockquote><p>\n  \u5728 vscode \u4e2d\u8fd0\u884c\u7a0b\u5e8f\u7684\u65b9\u6cd5\u5982\u4e0b\uff1a\u6253\u5f00\u7ec8\u7aef\uff08ctrl + \u6216 cmd + \uff09\uff1b\u5bfc\u822a\u5230\u7a0b\u5e8f\u76ee\u5f55\uff08cd \u547d\u4ee4\uff09\uff1b\u8fd0\u884c\u7a0b\u5e8f\uff08.\/program_name \u6216 program_name.exe\uff09\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202405\/15\/2024051504421642740.jpg\" class=\"aligncenter\" title=\"vscode\u5982\u4f55\u5728\u7ec8\u7aef\u8fd0\u884c\u7a0b\u5e8f\u63d2\u56fe\" alt=\"vscode\u5982\u4f55\u5728\u7ec8\u7aef\u8fd0\u884c\u7a0b\u5e8f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5728 VSCode \u4e2d\u8fd0\u884c\u7a0b\u5e8f<\/strong><\/p>\n<p><strong>\u6b65\u9aa4 1\uff1a\u6253\u5f00\u7ec8\u7aef<\/strong><\/p>\n<ul>\n<li>\u6309\u4e0b Ctrl + (Windows) \u6216 Cmd + (macOS)\u3002<\/li>\n<li>\u5982\u679c\u7ec8\u7aef\u9762\u677f\u4e0d\u53ef\u89c1\uff0c\u8bf7\u8f6c\u5230 &#8220;\u67e5\u770b&#8221; \u83dc\u5355\u5e76\u9009\u62e9 &#8220;\u7ec8\u7aef&#8221;\u3002<\/li>\n<\/ul>\n<p><strong>\u6b65\u9aa4 2\uff1a\u5bfc\u822a\u5230\u7a0b\u5e8f\u76ee\u5f55<\/strong><\/p>\n<ul>\n<li>\n<p>\u5728\u7ec8\u7aef\u4e2d\uff0c\u4f7f\u7528 cd \u547d\u4ee4\u5bfc\u822a\u5230\u5305\u542b\u8981\u8fd0\u884c\u7a0b\u5e8f\u7684\u76ee\u5f55\u3002\u4f8b\u5982\uff1a<\/p>\n<pre>cd \/path\/to\/program_directory<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<\/ul>\n<p><strong>\u6b65\u9aa4 3\uff1a\u8fd0\u884c\u7a0b\u5e8f<\/strong><\/p>\n<ul>\n<li>\n<p>\u5728\u7a0b\u5e8f\u76ee\u5f55\u4e2d\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fd0\u884c\u7a0b\u5e8f\uff1a<\/p>\n<pre>.\/program_name<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<li>\n<p>\u5bf9\u4e8e Windows \u7528\u6237\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>program_name.exe<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<\/ul>\n<p><strong>\u4f8b\u5982\uff1a<\/strong><\/p>\n<p>\u8981\u8fd0\u884c\u4e00\u4e2a\u540d\u4e3a &#8220;hello_world&#8221; \u7684 C++ \u7a0b\u5e8f\uff0c\u8bf7\u6267\u884c\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<ol>\n<li>\u5728 VSCode \u4e2d\u6253\u5f00\u9879\u76ee\u3002<\/li>\n<li>\u6309\u4e0b Ctrl + \u3002<\/li>\n<li>\u8f93\u5165\u547d\u4ee4 cd \/path\/to\/hello_world\u3002<\/li>\n<li>\u8f93\u5165\u547d\u4ee4 .\/hello_world\u3002<\/li>\n<\/ol>\n<p><strong>\u63d0\u793a\uff1a<\/strong><\/p>\n<ul>\n<li>\u5982\u679c\u7a0b\u5e8f\u6709\uff0c\u8bf7\u5728\u8fd0\u884c\u7a0b\u5e8f\u4e4b\u524d\u7f16\u8bd1\u5b83\u3002<\/li>\n<li>\u60a8\u8fd8\u53ef\u4ee5\u4f7f\u7528 F5 \u952e\u76f4\u63a5\u4ece VSCode \u8fd0\u884c\u7a0b\u5e8f\u3002<\/li>\n<li>\u8981\u505c\u6b62\u7a0b\u5e8f\uff0c\u8bf7\u6309\u4e0b Ctrl + C\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u5728\u7ec8\u7aef\u8fd0\u884c\u7a0b\u5e8f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 vscode \u4e2d\u8fd0\u884c\u7a0b\u5e8f\u7684\u65b9\u6cd5\u5982\u4e0b\uff1a\u6253\u5f00\u7ec8\u7aef\uff08ctrl + \u6216 cmd + \uff09\uff1b\u5bfc\u822a\u5230\u7a0b\u5e8f\u76ee\u5f55\uff08cd \u547d\u4ee4\uff09\uff1b\u8fd0\u884c\u7a0b\u5e8f\uff08.\/program_name \u6216 program_name.exe\uff09\u3002 \u5982\u4f55\u5728 VSCode \u4e2d\u8fd0\u884c\u7a0b\u5e8f \u6b65\u9aa4 1\uff1a\u6253\u5f00\u7ec8\u7aef \u6309\u4e0b Ctrl + (Windows) \u6216 Cmd + (macOS)\u3002 \u5982\u679c\u7ec8\u7aef\u9762\u677f\u4e0d\u53ef\u89c1\uff0c\u8bf7\u8f6c\u5230 &#8220;\u67e5\u770b&#8221; \u83dc\u5355\u5e76\u9009\u62e9 &#8220;\u7ec8\u7aef&#8221;\u3002 \u6b65\u9aa4 2\uff1a\u5bfc\u822a\u5230\u7a0b\u5e8f\u76ee\u5f55 \u5728\u7ec8\u7aef\u4e2d\uff0c\u4f7f\u7528 cd \u547d\u4ee4\u5bfc\u822a\u5230\u5305\u542b\u8981\u8fd0\u884c\u7a0b\u5e8f\u7684\u76ee\u5f55\u3002\u4f8b\u5982\uff1a cd \/path\/to\/program_directory \u767b\u5f55\u540e\u590d\u5236 \u6b65\u9aa4 3\uff1a\u8fd0\u884c\u7a0b\u5e8f \u5728\u7a0b\u5e8f\u76ee\u5f55\u4e2d\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fd0\u884c\u7a0b\u5e8f\uff1a .\/program_name \u767b\u5f55\u540e\u590d\u5236 \u5bf9\u4e8e Windows \u7528\u6237\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a program_name.exe \u767b\u5f55\u540e\u590d\u5236 \u4f8b\u5982\uff1a \u8981\u8fd0\u884c\u4e00\u4e2a\u540d\u4e3a &#8220;hello_world&#8221; \u7684 C++ \u7a0b\u5e8f\uff0c\u8bf7\u6267\u884c\u4ee5\u4e0b\u6b65\u9aa4\uff1a \u5728 VSCode \u4e2d\u6253\u5f00\u9879\u76ee\u3002 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-21253","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21253","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=21253"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21253\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=21253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=21253"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=21253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}