Correct usage of exit() in c++?

后端 未结 6 1287
再見小時候
再見小時候 2021-02-12 10:31

I have written a simple application that reads a data file, parses the text and then does some processing on that data. The data file is opened in my main() function. Is it good

6条回答
  •  不思量自难忘°
    2021-02-12 11:16

    exit(0) indicates successful program termination & it is fully portable, While

    exit(1) (usually) indicates unsucessful termination. However, it's usage is non-portable.

提交回复
热议问题