June 2025
Intermediate to advanced
1093 pages
33h 24m
English
Errors caused by the operating system or a similarly low level and reaching the program are typically returned to the caller as a numeric value. On a POSIX system, the “Permission denied” error is reported, for example, with the error code 1 (constant EPERM).
To write portable code, you need to translate these codes into general—portable—representations. In doing so, you must deal with many possible systems. And just to be able to do that, you also need to be able to access the system-specific codes again. On the one hand, you want a portable translation; on the other hand, you want system-specific low-level access.
The <system_error> header tries to bridge this gap. It contains lightweight ...
Read now
Unlock full access