在我的应用程序中读取/写入文件时,如果文件未正确关闭,我想退出(1)。在 Windows 上运行良好,但在 Linux 上出现此错误:
‘exit’ was not declared in this scope
我该如何解决?
谢谢。
最佳答案
如果这是在 C 中,你有没有 #include <stdlib.h>
?
关于c - Linux 上的退出函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2007558/