C++ helloworld

来源:互联网 发布:美国历年财政支出数据 编辑:程序博客网 时间:2024/06/06 03:22

万事开头难
1.创建空白文件 helloworld.cpp

#include <iostream>  int main(void)  {      std::cout << "helloworld" << std::endl;    return 0;  }  

编译,输出first.o

g++ helloworld.cpp -o first.o

执行

./first.o

可以看到输出一行文字“helloworld”

原创粉丝点击