Ubuntu16.04下C++探索初步
如何使用g++创建并编译一个简单的HelloWorld.cpp
在Ubuntu16.04系统下(其他任意Linux系统均可)
Ctrl+Alt+T 打开一个Terminal终端
创建并进入目标文件夹:
$ mkdir -p Practice/HelloWorld
$ cd ~/Practice/HelloWorld
创建helloworld.cpp
$ touch helloworld.cpp
使用 gedit 编辑代码:
$ gedit helloworld.cpp
在 gedit 编辑界面下输入如下代码:
#include <iostream>
using