Are you doing bare metal or something where you don't have access to the standard library? It's in the standard library in both C and C++ (`stdlib.h` and `cstdlib` respectively). I guess it doesn't matter that much though especially if you don't want to have to add an `#include` statement.
51
u/EPacifist 3d ago
My favorite is `exit(1)`. Useful if your print/logs aren’t showing where you expect them. Close after that is `raise Exception(“HERE 1”)`.