Should I return EXIT_SUCCESS or 0 from main()?

前端 未结 8 1098
梦毁少年i
梦毁少年i 2020-11-27 09:54

It\'s a simple question, but I keep seeing conflicting answers: should the main routine of a C++ program return 0 or EXIT_SUCCESS?

         


        
8条回答
  •  有刺的猬
    2020-11-27 10:24

    If you use EXIT_SUCCESS, your code will be more portable.

    http://www.dreamincode.net/forums/topic/57495-return-0-vs-return-exit-success/

提交回复
热议问题