本人空间所有文章如没有声明转载,则均为本人原创. comsyschen@163.com

GCC&G++ 下的HELLO WORLD

上一篇 / 下一篇  2008-02-12 22:31:41 / 个人分类:GCC&G++

IXPUB技术博客\P3y1jus.r9ZPY*l

温习一下GCC&G++IXPUB技术博客 `&^C9T xkfJS)D

n7hyJ3B#O"W)P0GCC*  hello.c - Canonical "Hello, World!" program
F4`,DZU0IXPUB技术博客5B:na3bj3H
#include <stdio.h>
%w+f(`+EA!@0int main(void)IXPUB技术博客Zqcv^D^ k
{IXPUB技术博客7Lr!I Tf
  printf("Hello,Linux programming world!\n");IXPUB技术博客bY8f(E6SI
  return 0;IXPUB技术博客's9\{)Zz?0[N(MU.@)j
}IXPUB技术博客*\8hK[bp#Xy!~6e+g
IXPUB技术博客3A0V7n7y*C

编译
#gcc hello.c -o hello.o
 
执行
./hello.o
Hello,Linux programming world!
 
 
G++IXPUB技术博客'm:x Eg\
///////////////////helloWorld.cppIXPUB技术博客wPb3To'GP
#include <iostream>
&ZZ R i:Z0using namespace std;
#kx AL({ ly0int main () IXPUB技术博客&gP2LC+hU1_D;I O
{IXPUB技术博客4e9CQ:Ay&s
       cout << "Hello world in ANSI-C++\n";IXPUB技术博客nhn^C4W1Q
       return 0;
0vq{ ^&W/d9ln0}
 
#g++ helloWorld.cpp -o helloIXPUB技术博客"s5U"r"p,sv

TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

Open Toolbar