vim编写C、C++程序过程(以hello world为例):
1、vim hello.c/hello.cpp。
创建hello.c/hello.cpp文件,并进入vim界面;
2、键入i,进入输入模式
3、编写hello.c/hello.cpp程序。
4、先按Esc键,退出输入模式然后,按Shift+:键,进入命令模式输入wq,保存并退出
5、编译hello.c/hello.cpp。
  5.1、对于C程序:用gcc hello.c便可编译;
  5.2、对于C++程序:用g++ hello.cpp可编译。编译后,均生成a.out的可执行文件;
6、键入指令"./a.out",运行程序。
7、在Terminal上显示"hello world"即成功。
GitHub 加速计划 / li / linux-dash
10.39 K
1.2 K
下载
A beautiful web dashboard for Linux
最近提交(Master分支:23 天前 )
186a802e added ecosystem file for PM2 4 年前
5def40a3 Add host customization support for the NodeJS version 4 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐