system(“pause”); - Why is it wrong?

前端 未结 13 2069
轻奢々
轻奢々 2020-11-21 07:39

Here\'s a question that I don\'t quite understand:

The command, system(\"pause\"); is taught to new programmers as a way to pause a program and wait for

13条回答
  •  野的像风
    2020-11-21 07:57

    For me it doesn't make sense in general to wait before exiting without reason. A program that has done its work should just end and hand over its resources back to its creator.

    One also doesn't silently wait in a dark corner after a work day, waiting for someone tipping ones shoulder.

提交回复
热议问题