I'm desperately trying to define custom error codes in C(++).
As for the project I'm working on it's forbidden to use Exceptions and Signals and any other approach which could allocate dynamic memory.
I used the standard error codes for some methods which produce errors resembling those but for some methods the errors are to specific to be covered by the standard error codes the OS is providing.
I also searched for the error strings in my system but couldn't manage to find the error messages O_O Where are those defined anyway?
So I'm searching for any method which allows me to define a custom error code (e.g. 666) and the correspondig error message ("Satan declared an error!") which will be outputted using strerror. Is this possible or do I have to meddle with some system related files?
In best regards, ahnimuhs