C/stdlib.h/Exit 2 — различия между версиями
Admin (обсуждение | вклад) м (1 версия: Импорт контента...) |
|
(нет различий)
|
Версия 17:20, 25 мая 2010
_Exit: exit program without closing files
<source lang="cpp">
//Declaration: void _Exit(int exit_code);
#include <stdlib.h> #include <stdio.h> int main(void) { char choice; do { printf("Quit (Q)\n"); choice = getchar(); } while(!strchr("Q", toupper(choice))); if(choice=="Q"){ _Exit(0); } return choice; } </source>