您的位置:首页 > 其它

Hello World

2015-10-19 20:11 239 查看
mkdir temp
cd temp

1)C程序

gedit testc.c
#include<stdio.h>
int main()
{
printf("Hello World!\n");
return 0;
}


gcc testc.c -o hello
./hello
Hello World!


2)C++程序

gedit test.cpp

#include<iostream>
int main(){
std::cout<<"Hello, world!\n";
}
g++ test.cpp -o test
./test
Hello, world!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  hello world