does c++ standard prohibit the void main() prototype?

前端 未结 6 1803
隐瞒了意图╮
隐瞒了意图╮ 2020-12-11 18:27

In section 3.6.1.2 of both C++ Standard 1998 and 2003 editions,

An implementation shall not predefine the main function. This function shall not be ov

6条回答
  •  一个人的身影
    2020-12-11 18:37

    The english you quote does prohibit declaring main to return void. It is allowing variation in the arguments that come in, but not in the return type.

提交回复
热议问题