06 2013 档案
ubuntu下C与C++开发 hello_world
摘要:安装C/C++编译器在终端下执行指令 sudo apt-get install build-essential编译第一个C程序创建文件first.c1 #include <stdio.h>2 3 int main(){4 printf("hello,world\n");5 return 0; 6 }执行下面命令编译cc -c first.c然后创建一个执行文件cc -o first first.c现在可以运行下面命令./first得到结果hello,world编译第一个C++程序创建文件first.cpp1 #include <iostream>2 阅读全文
posted @ 2013-06-17 23:46 niusixiong 阅读(297) 评论(0) 推荐(0)