Vscode 编写并运行C程序
2021/10/29 14:09:27
本文主要是介绍Vscode 编写并运行C程序,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
Vscode 编写并运行C程序
https://code.visualstudio.com/docs/languages/cpp
关于vscode
- C++ is a compiled language meaning your program’s source code must be translated (compiled) before it can be run on your computer.
- C++是个编译型编程语言,意味着必须将源代码翻译才能被计算机运行
- VS Code is first and foremost an editor, and relies on command-line tools to do much of the development workflow
- VS Code首先只是一个编辑器,依赖命令行工具来完成大部分开发工作流
- The C/C++ extension does not include a C++ compiler or debugger. You will need to install these tools or use those already installed on your computer.
- C/C++扩展并不包含一个C++编译器或者调试器,你需要自己安装这些工具
确定已经安装好编译器和调试器
打开vscode,按Ctrl+`打开终端
GCC complier
g++ --version
Clang complier
若有信息输出,则已经配置完毕
没有安装MingW,百度搜索
Build C Program
选择 终端 > 运行生成任务(或者Ctrl+Shift+B
)
选择gcc.exe build active file
然后就可以看见生成了对应的.exe文件
Run C Program
打开终端输入
.\文件名
这篇关于Vscode 编写并运行C程序的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-06-06Package Easy(基于 NSIS 的打包exe安装包工具)使用方法-icode9专业技术文章分享
- 2024-06-06基于 casdoor 的 ELK 开源登录认证解决方案: elk-auth-casdoor-icode9专业技术文章分享
- 2024-05-29Elasticsearch慢查询日志配置
- 2024-05-29揭秘华为如此多成功项目的产品关键——Charter模板
- 2024-05-29海外IDC业务拓展的7大挑战
- 2024-05-29InLine Chat功能优化对标Github Copilot,CodeGeeX带来更高效、更直观的编程体验!
- 2024-05-29CodeGeeX 智能编程助手 6 项功能升级,在Visual Studio插件市场霸榜2周!
- 2024-05-29AutoMQ 生态集成 Apache Doris
- 2024-05-292024年IDC行业的深度挖掘:机遇、挑战与未来展望
- 2024-05-29五款扩展组件齐发 —— Volcano、Keda、Crane-scheduler 等,邀你体验