{"id":20536,"date":"2024-11-19T14:44:08","date_gmt":"2024-11-19T06:44:08","guid":{"rendered":"https:\/\/fwq.ai\/blog\/20536\/"},"modified":"2024-11-19T14:44:08","modified_gmt":"2024-11-19T06:44:08","slug":"vscode%e5%a6%82%e4%bd%95%e8%bf%90%e8%a1%8cc%e7%a8%8b%e5%ba%8f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/20536\/","title":{"rendered":"vscode\u5982\u4f55\u8fd0\u884cc\u7a0b\u5e8f"},"content":{"rendered":"<blockquote><p>\n  \u5728 vscode \u4e2d\u8fd0\u884c c \u7a0b\u5e8f\u7684\u6b65\u9aa4\uff1a\u5b89\u88c5 c\/c++ \u6269\u5c55\u3002\u521b\u5efa\u6587\u4ef6\u5939\u5e76\u6253\u5f00 vscode\u3002\u521b\u5efa c \u6587\u4ef6\uff08\u4f8b\u5982\uff0cmain.c\uff09\u3002\u7f16\u5199\u4ee3\u7801\u5e76\u5728\u7ec8\u7aef\u4e2d\u7f16\u8bd1\u548c\u94fe\u63a5\uff08ctrl + shift + b\uff09\u3002\u4f7f\u7528\u547d\u4ee4 .\/main \u8fd0\u884c\u7a0b\u5e8f\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202404\/03\/2024040304271769411.jpg\" class=\"aligncenter\" title=\"vscode\u5982\u4f55\u8fd0\u884cc\u7a0b\u5e8f\u63d2\u56fe\" alt=\"vscode\u5982\u4f55\u8fd0\u884cc\u7a0b\u5e8f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5728 VSCode \u4e2d\u8fd0\u884c C \u7a0b\u5e8f<\/strong><\/p>\n<p><strong>\u5982\u4f55\u8fd0\u884c C \u7a0b\u5e8f<\/strong><\/p>\n<p>\u5728 Visual Studio Code \u4e2d\u8fd0\u884c C \u7a0b\u5e8f\u9700\u8981\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<ol>\n<li> <strong>\u5b89\u88c5 C\/C++ \u6269\u5c55\uff1a<\/strong>\u6253\u5f00 VSCode \u5e76\u5bfc\u822a\u5230\u6269\u5c55\u9762\u677f\uff08Ctrl + Shift + X\uff09\u3002\u641c\u7d22 &#8220;C\/C++&#8221; \u5e76\u5b89\u88c5\u6269\u5c55\u3002<\/li>\n<li> <strong>\u521b\u5efa\u9879\u76ee\uff1a<\/strong>\u65b0\u5efa\u4e00\u4e2a\u6587\u4ef6\u5939\u7528\u4e8e\u5b58\u653e C \u7a0b\u5e8f\uff0c\u7136\u540e\u5728\u8be5\u6587\u4ef6\u5939\u4e2d\u6253\u5f00 VSCode\u3002\u53f3\u952e\u5355\u51fb VSCode \u5de5\u4f5c\u533a\uff0c\u9009\u62e9 &#8220;\u65b0\u5efa&#8221; &gt; &#8220;\u6587\u4ef6\u5939&#8221;\u3002<\/li>\n<li> <strong>\u521b\u5efa C \u6587\u4ef6\uff1a<\/strong>\u5728\u9879\u76ee\u6587\u4ef6\u5939\u4e2d\u53f3\u952e\u5355\u51fb\uff0c\u9009\u62e9 &#8220;\u65b0\u5efa\u6587\u4ef6&#8221;\uff0c\u7136\u540e\u5c06\u6587\u4ef6\u547d\u540d\u4e3a &#8220;main.c&#8221;\u3002<\/li>\n<li> <strong>\u7f16\u5199\u4ee3\u7801\uff1a<\/strong>\u5728 &#8220;main.c&#8221; \u6587\u4ef6\u4e2d\u8f93\u5165\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/li>\n<\/ol>\n<pre>#include &lt;stdio.h&gt;\n\nint main() {\n    printf(\"Hello, world!\n\");\n    return 0;\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<ol>\n<li> <strong>\u6784\u5efa\u9879\u76ee\uff1a<\/strong>\u6309 Ctrl + Shift + B (Windows\/Linux) \u6216 Cmd + Shift + B (macOS) \u6784\u5efa\u9879\u76ee\u3002\u8fd9\u5c06\u7f16\u8bd1\u548c\u94fe\u63a5 C \u4ee3\u7801\uff0c\u751f\u6210\u4e00\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/li>\n<li> <strong>\u8fd0\u884c\u7a0b\u5e8f\uff1a<\/strong>\u5728 VSCode \u4e2d\u6253\u5f00\u7ec8\u7aef\uff08Ctrl + \u6216 Cmd + \uff09\u3002\u5728\u7ec8\u7aef\u4e2d\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fd0\u884c\u53ef\u6267\u884c\u6587\u4ef6\uff1a<\/li>\n<\/ol>\n<pre>.\/main<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8fd9\u5c06\u6253\u5370 &#8220;Hello, world!&#8221; \u5230\u7ec8\u7aef\u3002<\/p>\n<p><strong>\u5176\u4ed6\u63d0\u793a<\/strong><\/p>\n<ul>\n<li>\u5982\u679c\u7f16\u8bd1\u6216\u8fd0\u884c\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u9519\u8bef\uff0c\u8bf7\u68c0\u67e5\u4ee3\u7801\u662f\u5426\u5b58\u5728\u8bed\u6cd5\u9519\u8bef\u6216\u8def\u5f84\u95ee\u9898\u3002<\/li>\n<li>\u53ef\u4ee5\u5728 VSCode \u8bbe\u7f6e\u4e2d\u914d\u7f6e\u6784\u5efa\u548c\u8fd0\u884c\u9009\u9879\u3002<br \/>*\u53ef\u4ee5\u4f7f\u7528 \u8c03\u8bd5\u5668\uff08F5\uff09 \u5bf9\u7a0b\u5e8f\u8fdb\u884c\u8c03\u8bd5\u3002<br \/>*\u53ef\u4ee5\u4f7f\u7528 IntelliSense\uff08Ctrl + Space\uff09\u83b7\u5f97\u4ee3\u7801\u8865\u5168\u548c\u6587\u6863\u5efa\u8bae\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u8fd0\u884cc\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 c \u7a0b\u5e8f\u7684\u6b65\u9aa4\uff1a\u5b89\u88c5 c\/c++ \u6269\u5c55\u3002\u521b\u5efa\u6587\u4ef6\u5939\u5e76\u6253\u5f00 vscode\u3002\u521b\u5efa c \u6587\u4ef6\uff08\u4f8b\u5982\uff0cmain.c\uff09\u3002\u7f16\u5199\u4ee3\u7801\u5e76\u5728\u7ec8\u7aef\u4e2d\u7f16\u8bd1\u548c\u94fe\u63a5\uff08ctrl + shift + b\uff09\u3002\u4f7f\u7528\u547d\u4ee4 .\/main \u8fd0\u884c\u7a0b\u5e8f\u3002 \u5728 VSCode \u4e2d\u8fd0\u884c C \u7a0b\u5e8f \u5982\u4f55\u8fd0\u884c C \u7a0b\u5e8f \u5728 Visual Studio Code \u4e2d\u8fd0\u884c C \u7a0b\u5e8f\u9700\u8981\u4ee5\u4e0b\u6b65\u9aa4\uff1a \u5b89\u88c5 C\/C++ \u6269\u5c55\uff1a\u6253\u5f00 VSCode \u5e76\u5bfc\u822a\u5230\u6269\u5c55\u9762\u677f\uff08Ctrl + Shift + X\uff09\u3002\u641c\u7d22 &#8220;C\/C++&#8221; \u5e76\u5b89\u88c5\u6269\u5c55\u3002 \u521b\u5efa\u9879\u76ee\uff1a\u65b0\u5efa\u4e00\u4e2a\u6587\u4ef6\u5939\u7528\u4e8e\u5b58\u653e C \u7a0b\u5e8f\uff0c\u7136\u540e\u5728\u8be5\u6587\u4ef6\u5939\u4e2d\u6253\u5f00 VSCode\u3002\u53f3\u952e\u5355\u51fb VSCode \u5de5\u4f5c\u533a\uff0c\u9009\u62e9 &#8220;\u65b0\u5efa&#8221; &gt; &#8220;\u6587\u4ef6\u5939&#8221;\u3002 \u521b\u5efa C \u6587\u4ef6\uff1a\u5728\u9879\u76ee\u6587\u4ef6\u5939\u4e2d\u53f3\u952e\u5355\u51fb\uff0c\u9009\u62e9 &#8220;\u65b0\u5efa\u6587\u4ef6&#8221;\uff0c\u7136\u540e\u5c06\u6587\u4ef6\u547d\u540d\u4e3a [&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-20536","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20536","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=20536"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20536\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=20536"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=20536"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=20536"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}