DEV Community

Discussion on: How to exit a C++ program?

Collapse
 
dynamicsquid profile image
DynamicSquid

I think return statements and exceptions are much better alternatives, as both allow greater control on how to handle an error. Also, std::exit() doesn't unwind the stack.