2012年8月29日
摘要: 单个源文件生成可执行程序下面是一个保存在文件 helloworld.cpp 中一个简单的 C++ 程序的代码:/* helloworld.cpp */#include <iostream>int main(int argc,char *argv[]){ std::cout << "hello, world" << std::endl; return(0);}程序使用定义在头文件 iostream 中的 cout,向标准输出写入一个简单的字符串。该代码可用以下命令编译为可执行文件:$ g++ helloworld.cpp编译器 g++ 通过 阅读全文
posted @ 2012-08-29 12:25 cbwcwy 阅读(46105) 评论(1) 推荐(3) 编辑