level 3
网上有void main与int main ,第二个为什么是对的 还有直接写main不就可以么
2012年08月09日 13点08分
1
level 4
直接写main实际是就是int main,int省略掉了,void main 是没有返回值
2012年08月09日 14点08分
4
level 3
还有一个,就是定义一个函数例如
int max是不是也可以写成void max
跟上面的区别是不是一样,用第二个是不是没有返回值
2012年08月09日 14点08分
6
多看书吧,有时候有些函数需要返回一些必要的值。有些则不需要就void了
2012年08月09日 14点08分
规定main函数必须有返回值 且类型为int
2012年08月09日 14点08分