Chinaunix

标题: linux下C、C++编程 [打印本页]

作者: tubilly    时间: 2009-08-15 22:33
标题: linux下C、C++编程
建立一个hello.c文件:
#include
int main()
{
    printf("hello, linux!");
    return 0;
}
gcc hello.c -o hello
./hello
完成测试,使用C++则建立一个hello.cpp 或hello.cxx
Linux下的c++编译器是g++ 把gcc换成g++
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/102400/showart_2028984.html




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2