error: ‘exit’ was not declared in this scope

When I first started writing programs using Linux and G++, I encountered a variety of errors, such as the following
Error: ‘exit’ was not declared in this scope
The solution is
add

#include < cstdlib>

To:

Read More: