下载vscode并安装
方法1、在ubuntu软件中搜索 vscode下载,但是我失败了
方法2、直接去官网下载https://code.visualstudio.com/Download,下载Linux版本的并安装
方法3、终端命令安装 (转自https://blog.csdn.net/qq_50840738/article/details/126060563)
插入 Microsoft GPG key:
wget -q https:
启用 Visual Studio Code 源仓库:
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
安装 Visual Studio Code 软件包:
sudo apt install code
配置C/C++环境
1、终端添加gcc和g++
sudo apt-get install gcc
sudo apt-get install g++
2、安装中文语言包
在扩展中搜索chinese,安装第一个
3、搜索C++,安装第一个
4、搜索coderunner,安装
(和windows下差不多)
测试
1、新建cppdemo文件夹
2、添加testcpp.cpp和headertest.h(顺便测一下能不能用头文件)
3、按右上角的三角形,选择g++,在终端显示结果
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)