std::exit
来自cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| Defined in header <cstdlib>
|
||
| [[noreturn]] void exit( int exit_code ); |
(C++11 起) | |
| void exit( int exit_code ); |
(至 C++11) | |
導致正常的程序終止發生.
Original:
Causes normal program termination to occur.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
若干清理步驟被執行:
Original:
Several cleanup steps are performed:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
- 線程本地存儲時間對象的析構函數被調用Original:destructors of objects with thread local 存儲時間 are calledThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - 具有靜態存儲持續時間的對象的析構函數被調用Original:destructors of objects with static storage duration are calledThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - 功能傳遞給std::atexit被調用。如果有異常傳播的任何功能,被稱為std::terminateOriginal:functions passed to std::atexit are called. If an exception tries to propagate out of any of the function, std::terminate is calledThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - 刷新並關閉所有的C流Original:all C streams are flushed and closedThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - std::tmpfile所創建的文件將被刪除Original:files created by std::tmpfile are removedThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - 控制被返回到主機環境。如果
exit_code是EXIT_SUCCESS,實現自定義的狀態,表示成功終止。如果exit_code是EXIT_FAILURE,實現自定義的狀態,表示成功終止。在其他情況下實現自定義的狀態值,則返回.Original:control is returned to the host environment. Ifexit_codeis EXIT_SUCCESS, an implementation-defined status, indicating successful termination is returned. Ifexit_codeis EXIT_FAILURE, an implementation-defined status, indicating unsuccessful termination is returned. In other cases implementation-defined status value is returned.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
不調用析構函數的變數自動存儲的持續時間.
Original:
Destructors of variables with automatic 存儲的持續時間 are not called.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
目錄 |
[编辑] 參數
| exit_code | - | 退出的程序的狀態
Original: exit status of the program The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[编辑] 返回值
(無)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[编辑] 為例
| 本節是不完整的 原因: no example |
[编辑] 另請參閱
| 導致程序異常終止(不清洗) Original: causes abnormal program termination (without cleaning up) The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函數) | |
| 註冊exit()調用一個函數被調用 Original: registers a function to be called on exit() invocation The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函數) | |
| (C++11) |
沒有完全清理,會導致正常的程序終止 Original: causes normal program termination without completely cleaning up The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函數) |
| C documentation for exit
| |