天天看點

Ubuntu 下 C++ 程式設計起步

1. 首先安裝g++

  sudo apt-get install build-essential

2. 輸入一個簡單的cpp程式

#include <iostream>

using namespace std;

int main()

{

    cout << "Hello Ubuntu!" << endl;

    return 0;

}

3. 編譯

4. 運作

5. 結果

  Hello Ubuntu!