天天看点

error: ‘exit’ was not declared in this scope

linux 里面C++编程,使用了exit(1)函数出现如下错误:

      error: ‘exit’ was not declared in this scope

解决:

       头文件添加:#include <cstdlib>