主要的回报值 [英] return value of main
问题描述
ANSI-C 99标准规定主要功能
有int作为返回类型。然而,仍然有很多人声称无效。作为主要返回类型。
之前的ANSI-C标准是否定义为void作为回归类型
或者这个问题只是缺乏C知识吗?
问候,
克里斯
Christian Christmann写道:
ANSI-C 99标准规定主函数
具有int值。作为返回类型。然而,仍然有很多人声称无效。作为主要返回类型。
之前的ANSI-C标准是否定义为void作为返回类型
或者这个问题只是缺乏C知识吗?
后者。
尝试使用gcc -Wall -ansi -pedantic编译void main(){}。
-
Ian Collins。
? Christian Christmann < PL ***** @ yahoo.de ?????? ??? ??????
新闻:pa **************************** @ yahoo.de。 ..
ANSI-C 99标准规定主函数
具有int作为返回类型。然而,仍然有很多人声称无效。作为主要返回类型。
之前的ANSI-C标准是否定义为void作为返回类型
或者这个问题只是缺乏C知识吗?
查看问题11.12a-11.15 C faq
( http://c-faq.com/ansi/) 。
以前的ANSI-C标准没有将void定义为返回类型。
-
Papastefanos Serafeim
Papastefanos Serafeim写道:
? Christian Christmann < PL ***** @ yahoo.de ?????? ??? ??????
新闻:pa **************************** @ yahoo.de。 ..
ANSI-C 99标准规定主函数
具有int作为返回类型。然而,仍然有很多人声称无效。作为主要返回类型。
之前的ANSI-C标准是否定义为void作为返回类型
或者这个问题只是缺乏C知识吗?
查看问题11.12a-11.15 C faq
( http://c-faq.com/ansi/) 。
以前的ANSI-C标准没有将void定义为返回类型。
这只是草率的帖子,其中你的意思是没有ANSI C标准有
定义为void作为主要的返回类型或者它是否是因为*第一个* ANSI C标准(1989)再次打击而试图夺走属于C $ / b $ b的一部分的雅各布的疾病?
检查1989 C标准中关于空隙类型的3.1.2.5。
Hi,
the ANSI-C 99 standard specifies that the main function
has "int" as return type. However, there are still lots
of people declaring "void" as main return type.
Did previous ANSI-C standards defined "void" as return type
or is this issue just a lack of C knowledge?
Regards,
Chris
Christian Christmann wrote:Hi,
the ANSI-C 99 standard specifies that the main function
has "int" as return type. However, there are still lots
of people declaring "void" as main return type.
Did previous ANSI-C standards defined "void" as return type
or is this issue just a lack of C knowledge?
The latter.
Try compiling void main(){} with gcc -Wall -ansi -pedantic.
--
Ian Collins.
? "Christian Christmann" <pl*****@yahoo.de?????? ??? ??????
news:pa****************************@yahoo.de...the ANSI-C 99 standard specifies that the main function
has "int" as return type. However, there are still lots
of people declaring "void" as main return type.
Did previous ANSI-C standards defined "void" as return type
or is this issue just a lack of C knowledge?Check questions 11.12a-11.15 of the C faq
(http://c-faq.com/ansi/).
Previous ANSI-C standards did not define void as return type.
--
Papastefanos Serafeim
Papastefanos Serafeim wrote:? "Christian Christmann" <pl*****@yahoo.de?????? ??? ??????
news:pa****************************@yahoo.de...the ANSI-C 99 standard specifies that the main function
has "int" as return type. However, there are still lots
of people declaring "void" as main return type.
Did previous ANSI-C standards defined "void" as return type
or is this issue just a lack of C knowledge?
Check questions 11.12a-11.15 of the C faq
(http://c-faq.com/ansi/).
Previous ANSI-C standards did not define void as return type.Is this just sloppy posting, in which you meant "No ANSI C standard has
defined void as the return type for main", or is it
Jacob''s disease of trying to take away features that have been part of C
since the *first* ANSI C standard (1989) striking again?
Check 3.1.2.5 of the 1989 C standard for the void type.
这篇关于主要的回报值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!