std::perror
Min standard notice:
Header: <cstdio>
Prints a textual description of the error code currently stored in the system variable errno to stderr.
# Declarations
void perror( const char *s );
# Parameters
s: pointer to a null-terminated string with explanatory message
# Return value
(none)
# Example
#include <cerrno>
#include <cmath>
#include <cstdio>
int main()
{
double not_a_number = std::log(-1.0);
if (errno == EDOM)
std::perror("log(-1) failed");
std::printf("%f\n", not_a_number);
}