[Error] 'exit' was not declared in this scope的解决方法

新手刚开始用Linux和c++写程序,可能会出现下面的错误

error: ‘exit’ was not declared in this scope

解决方法是

添加

#include <cstdlib>

 
 
posted @ 2017-11-12 19:41  希声lx  阅读(24089)  评论(0编辑  收藏  举报