我的初学语言的
我用《c程序设计(第二版)》,里面用TC编译的,但是我在linux下用gcc编译,发现用TC编的程序在gcc下不能通过编译
比如 在TC下 在gcc下的
#include <stdio.h> #include <stdio.h>
main () int #这里多了一个int#
{ main ()
int a,b; {
scanf ("%d,%d",&a,&b); int a,b;
if (a>b) b=a; scanf ("%d,%d",&a,&b);
printf ("b=%d",b); if (a>b) b=a;
} printf ("b=%d",b);
就可以通过编译 return 0; #这了要有一个这样的#
}
要多这两行才能编译
这两行是什么意思呢
[问题]关于gcc和tc的区别
-
- 帖子: 30
- 注册时间: 2008-07-16 13:59
-
- 帖子: 30
- 注册时间: 2008-07-16 13:59
- BigSnake.NET
- 帖子: 12522
- 注册时间: 2006-07-02 11:16
- 来自: 廣州
- 联系:
- kofshower
- 帖子: 1343
- 注册时间: 2007-03-13 11:23
- 联系:
不同厂家编译器的不同。这个在很多语言上都是存在的。
"We are all in the mud, but some of us are looking at the stars." (Oscar Wilde)
We are not born for ourselves.
人生天地间,并非为自己
Homepage:http://sites.google.com/site/polarisnotme/
We are not born for ourselves.
人生天地间,并非为自己
Homepage:http://sites.google.com/site/polarisnotme/