mac使用vs code开发c++配置
1.下载vs code
https://code.visualstudio.com/
2.安装插件c/c++

3.安装插件 code runner

4.找个目录创建个文件夹
比如在桌面创建hello_word

5.使用vs code打开文件夹

6.新建hello_w.cpp文件

#include <iostream>
using namespace std;
int main()
{
cout << "hello world" << endl;
// system("pause");
return 0;
}
7.⇧+⌘+P输入选择C/Cpp: Edit Configurations(JSON)
创建 c_cpp_properties.json文件

8.⇧+⌘+P输入选择Tasks: Configure Task
创建 tasks.json

详细步骤如下



9.run->add configuration->c++
创建 launch.json

详细步骤如下

10.代码目录结构

11.运行代码

12.结果展示

转载:https://blog.csdn.net/weixin_41194171/article/details/116307752
查看评论