C++之helloworld
#include <iostream> // 標準的輸入輸出流
using namespace std; // 命名空間 防止命名衝突
// main 函數
int main()
{
// 標準輸出
// << 拼接功能
// endl 結束換行
cout << "hello world" << endl;
system("pause"); // 阻塞功能
return EXIT_SUCCESS; // 正常退出
}
** 編譯命令 **
g++ xxx.cpp -o xxx // 編譯xxx.cpp 文件爲 xxx 可執行文件
start xxx.exe // 執行 xxx.exe 可執行文件