VS Code C/C++配置
可能失败
MinGW编译器安装
下载并安装MinGW,网址如下
MinGW - Minimalist GNU for Windows Project Top Page - OSDN
Pros You probably don't want to have to type the full path for every command you want to use. Add the directory containing your new GNU executables to your path in Windows. There are two root directories of executables to add: one for MinGW (including GCC and its related toolchain) and another for MSYS (including Bash and many common tools from the GNU and BSD projects).
https://osdn.net/projects/mingw/

安装可安装在非系统盘,请将路径添加至系统环境变量Path中。
安装并添加路径完成后,在命令行界面使用gcc -v
命令,可查看版本信息,如未显示则安装过程不完整。
VS Code环境安装
可只安装

也可安装

后者是个组合扩展包,包括了
- C/C++
- C/C++ Themes
- CMake
- CMake Tools
- Doxygen Documentation Generator
- Better C++ Syntax
- Remote - WSL
- Remote - Containers
- Remote - SSH
安装完成后即可使用
完成程序编码后,使用右上角的Run Code(ctrl+shift+N
)或进行调试(F5
)运行,断点设置与其他语言相同。
编辑时间:2022年3月2日08:44:48@zhizhemodi\ZUCC_CS课程资料集