What the reasons for/against returning 0 from main in ISO C++?

后端 未结 9 1567
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-20 19:12

I know that the C++ standard says that return 0 is inserted at the end of main() if no return statement is given; however, I often see recently-wri

9条回答
  •  北荒
    北荒 (楼主)
    2021-01-20 19:44

    Misunderstanding. There's simply no reason to, and if someone doesn't know that they'll add return 0;.

提交回复
热议问题