c语言void跟int中开头的int main (void)是什么意思。我真的知道int是整数void是0,但是我

c语言中,main()
int main(void) int main()
void main()
有什么区别? - 知乎26被浏览9420分享邀请回答int main(int argc, char **argv) {
当然也可以写成int main(int argc, char *argv[]) {
是等价的根据标准The function called at program startup is named main. The implementation declares no
prototype for this function. It shall be defined with a return type of int and with no
parameters:
int main(void) { /* ... */ }or with two parameters (referred to here as argc and argv, though any names may be
used, as they are local to the function in which they are declared):
int main(int argc, char *argv[]) { /* ... */ } 9) or in some other implementation-defined manner. 一些平台定义的main函数参数列表,请看引用2。谢邀。引用:12添加评论分享收藏感谢收起4添加评论分享收藏感谢收起查看更多回答2003年8月 C++ Builder大版内专家分月排行榜第一2003年7月 C++ Builder大版内专家分月排行榜第一2003年5月 C++ Builder大版内专家分月排行榜第一2003年3月 C++ Builder大版内专家分月排行榜第一2003年1月 C++ Builder大版内专家分月排行榜第一2002年11月 C++ Builder大版内专家分月排行榜第一2002年7月 C++ Builder大版内专家分月排行榜第一2002年6月 C++ Builder大版内专家分月排行榜第一2002年5月 C++ Builder大版内专家分月排行榜第一
2005年9月 C++ Builder大版内专家分月排行榜第二2004年9月 C++ Builder大版内专家分月排行榜第二2004年7月 C++ Builder大版内专家分月排行榜第二2004年6月 C++ Builder大版内专家分月排行榜第二2003年6月 C++ Builder大版内专家分月排行榜第二2003年4月 C++ Builder大版内专家分月排行榜第二2003年2月 C++ Builder大版内专家分月排行榜第二2002年10月 C++ Builder大版内专家分月排行榜第二2002年9月 C++ Builder大版内专家分月排行榜第二2002年8月 C++ Builder大版内专家分月排行榜第二2002年4月 C++ Builder大版内专家分月排行榜第二
本帖子已过去太久远了,不再提供回复功能。

我要回帖

更多关于 int main void 的文章

 

随机推荐