本文介绍了int main()或int main(void)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计们!

我遇到了一个问题:

我应该使用" int main()"或者int main(void),是一种

风格

问题?

这是什么标准C99推荐?

如果它是风格的话一,哪里可以获得标准或近乎

标准C

风格? K& R或者什么?


非常感谢!


Frederick Ding

2005-12-3

Hi, guys!
I met a problem:
Should I use "int main()" or "int main(void)", is that a kind of
"style"
problem?
And which is the standard C99 recommend?
If it''s a "style" one, where can I get the standard or nearly
standard C
style? K&R or what?

Thanks a lot!

Frederick Ding
2005-12-3

推荐答案




int main(void )是一个完整的功能原型,因此优于

仅仅的声明。


-

Richard Heathfield

Usenet是一个奇怪的地方 - dmr 29/7/1999


电子邮件:rjh在上面的域名(但显然放弃了www)



int main(void) is a full function prototype, and thus is preferable to a
mere declaration.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)




这篇关于int main()或int main(void)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 21:36
查看更多