Is main() a User-Defined Function? [duplicate]
问题 This question already has answers here : main() in C, C++, Java, C# (9 answers) Closed 4 months ago . The programmer does define what happens inside main() , after all. So, should it be considered a user-defined function? 回答1: The C++ standard doesn't have the notion of user-defined functions. Instead, it has the notion of library functions . main is not a library function. However, the standard also imposes some requirements on its signature, and that it must not be overloaded or declared