C ++中存在main()函数的地方?它是用户定义的功能吗? [英] Where the main() function exists in c++ ? Is it a user defined function?
本文介绍了C ++中存在main()函数的地方?它是用户定义的功能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
c ++中main()函数在哪里?
解决方案
请参阅定义 ^ ].
例如,参见"Main [ ^ ].
程序必须包含一个名为main()
的函数.该函数是程序的指定开始.该函数不是编译器预定义的,不能重载,并且其类型取决于实现. ."带注释的C ++参考手册,M.A. Ellis& B.Stroustrup,Addison-Wesley,1986年,第3.4节.
实际上,它是用户定义的功能.您可以在源代码的某个位置.cpp文件中找到它(+请参阅解决方案4).
Where the main() function exists in c++ ? Is it a user defined function?
解决方案
See the definition here[^].
See, for instance "Main function" at Wikipedia[^].
"A program must contain a function calledmain()
. This function is the designated start of the program. The function is not predefined by the compiler, it cannot be overloaded, and its type is implementation dependent." The Annotated C++ Reference Manual, M. A. Ellis & B. Stroustrup, Addison-Wesley, 1986, Section 3.4.
Indeed, it is a user-defined function. You will find it somewhere in the source code, in a .cpp file (+ see Solution 4).
这篇关于C ++中存在main()函数的地方?它是用户定义的功能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文