C++ Language/ErrorHandling/ReturningAnErrorCode

When a low-level feature of the operating system needs to report an error, it usually does so by returning an "error code". The Win32 platform has four built-in enumerations of error codes, which the C++ language has combined into a single  type.

Additional information about error codes (includes interactive examples)