C++ void return type of main()

后端 未结 8 2449
灰色年华
灰色年华 2020-12-11 01:58

Some C++ compilers allow the main function to have return type void. But doesn\'t the Operating System require int type value returned to specify

8条回答
  •  长情又很酷
    2020-12-11 02:05

    The C++ standard does not allow main() to have a return type of void. Most compilers will let it pass for historical reasons, though.

提交回复
热议问题