There is a condition; when it is executed, the program must close.

    2 answers 2

    exit(0); //Параметр - статус, который ловит хост. Если хост ничего не ловит, все равно что тут стоит. 

    Everything closes and goes.

    • Thank! exactly what is needed. - danny_rules
    • one
      Left tick to accept the answer - knes

    No command 'exit('число');' in C ++:

    error: 'exit' was not declared in this scope
    exit (0); ^

    Measure: I replaced 'exit(0);' on 'return 0;' , it all worked.

    • So I replaced 'exit (0);' on 'return 0;' e patom earned the program. - user219751
    • one
      Actually, there is a header file stdlib.h or cstdlib - pavel
    • return 0; will only help in main() . - jfs
    • stdlib.h works, but I do not know what cstdlib is. - user219751