{"id":1149,"date":"2022-09-24T02:22:00","date_gmt":"2022-09-24T02:22:00","guid":{"rendered":"https:\/\/262235.xyz\/?p=1149"},"modified":"2022-09-24T02:22:00","modified_gmt":"2022-09-24T02:22:00","slug":"1149","status":"publish","type":"post","link":"https:\/\/lyvba.com\/index.php\/2022\/09\/24\/1149\/","title":{"rendered":"VS Code \u4ee3\u7801\u683c\u5f0f\u5316  \u4f7f\u7528 \u5feb\u6377\u952e Shift+Alt+F \u4f7f\u7528Run Code\u8fd0\u884c\u4f1a\u66f4\u52a0\u65b9\u4fbf"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2022\/09\/217933473.gif\" alt=\"vscode.gif\" title=\"vscode.gif\"><\/p>\n<pre><code>#include &lt;stdio.h&gt;\nint main()\n{\n    printf(\"\u4f60\u597d VSCODE\");\n    return 0;\n}\n\n\/\/ VS Code \u4ee3\u7801\u683c\u5f0f\u5316  \u4f7f\u7528 \u5feb\u6377\u952e Shift+Alt+F\n\n\/\/ g++ -std=c++11  -Wall -O2 -s -shared-libstdc++ -m64  -fexec-charset=gbk -finput-charset=UTF-8 -o hl obj\/a.o<\/code><\/pre>\n<h2>VS Code \u4f7f\u7528 C\/C++ Makefile Project \u63d2\u4ef6\u5efa\u7acb\u9879\u76ee<\/h2>\n<h3><a href=\"https:\/\/www.bilibili.com\/video\/BV1eD4y1i7R6\">https:\/\/www.bilibili.com\/video\/BV1eD4y1i7R6<\/a><\/h3>\n<p>\u6309\u4e0a\u9762\u89c6\u9891\u6267\u884c make  (mingw32-make.exe) \uff0c \u6a21\u7248\u4f1a\u5e2e\u6211\u4eec\u751f\u6210 \u7c7b\u4f3c\u4e0a\u884c\u7684 g++ \u7f16\u8bd1\u547d\u4ee4<\/p>\n<h2>VS Code \u5199 C\/C++ \u4e2d\u6587\u4e71\u7801\u89e3\u51b3<\/h2>\n<ul>\n<li>\n<p>VSCODE\u4e2d\u4e00\u822c\u5e94\u8be5\u90fd\u662f\u4f7f\u7528 GCC\u7f16\u8bd1\u5668\u7684\uff0c\u6dfb\u52a0\u4e24\u4e2a\u53c2\u6570\uff0c\u610f\u601d\u662f exe\u6587\u4ef6GBK\u7801\uff0c\u6e90\u7801\u662fUTF-8<\/p>\n<h3><code>-fexec-charset=gbk -finput-charset=UTF-8<\/code><\/h3>\n<\/li>\n<\/ul>\n<h2>\u5355\u4e2aC\/C++\u6e90\u7801\u6587\u4ef6\uff0c\u4f7f\u7528 Run Code \u8fd0\u884c\u4f1a\u66f4\u52a0\u65b9\u4fbf<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2022\/09\/2552177956.gif\" alt=\"runcode.gif\" title=\"runcode.gif\"><\/p>\n<pre><code>[Running] cd \"r:cppsrc\" &amp;&amp; g++ a.cpp -o a &amp;&amp; \"r:cppsrc\"a\n\u4f60\u597d VSCODE\n[Done] exited with code=0 in 0.162 seconds<\/code><\/pre>\n<p>\u8fd9\u4e2a\u63d2\u4ef6\uff0c\u4f7f\u7528\u4e00\u884c\u547d\u4ee4\u884c\uff0c\u5b8c\u6210\u4e86\u8fdb\u5165\u6e90\u7801\u76ee\u5f55\uff0c\u7f16\u8bd1 \u548c\u8fd0\u884c\u7a0b\u5e8f\uff0c\u5c0f\u767d\u9996\u9009<\/p>\n","protected":false},"excerpt":{"rendered":"<p>#include &lt;stdio.h&gt; int main() { printf(&#8220;\u4f60\u597d V [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[31,50],"class_list":["post-1149","post","type-post","status-publish","format-standard","hentry","category-learn","tag-cpp","tag-vscode"],"_links":{"self":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts\/1149","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/comments?post=1149"}],"version-history":[{"count":0,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts\/1149\/revisions"}],"wp:attachment":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/media?parent=1149"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/categories?post=1149"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/tags?post=1149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}