search

Home  >  Q&A  >  body text

C/C++如何直接关闭应用程序窗口?

Windows下return 0;exit();都不能达到直接关闭应用程序窗口的效果,怎样才能跳过press any key to continue呢?

PHP中文网PHP中文网2803 days ago1388

reply all(3)I'll reply

  • 阿神

    阿神2017-04-17 11:40:06

    Because your program does not run independently, but is run by another software (such as IDE). This software implements a feature called "Let the running program not close the window immediately after execution, but wait for press any key.”

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 11:40:06

    No need to close the window when using the linux command line, press any key to continue
    I don't know if it can be solved either.
    I don’t think it’s realistic to solve this problem. The automatic shutdown you want is to wait until you finish running.
    There is a kind of automatic closing called flashing by. You can't see it at all. Is it troublesome to press enter?

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 11:40:06

    It’s not clear who closes whose application window.

    reply
    0
  • Cancelreply