Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的应用程序中读取/写入文件时,如果文件未正确关闭,我想退出(1)。在 Windows 上运行良好,但在 Linux 上出现此错误:
‘exit’ was not declared in this scope
我该如何解决?
谢谢。
如果这是在 C 中,是 #include <stdlib.h>吗?
#include <stdlib.h>
如果这是 C++,则必须包含 cstdlib:
#include <cstdlib>