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 可执行文件