#include Description The header file defines the integer variable errno, which is set by system calls and some library functions in the event of an error to indicate what went wrong. Its value is significant only when the call returned an error (usually -1), and a function that does succeed is allowed to change errno. such as: #include #include //sqrt() #include //errno and perror need int main() { double d; d=sqrt((double)-1); if(errno) { perror("sqrt -1 failed"); errno=0; } else cout<<"sqrt -1 ="<return 0; } the reault: $ ./test sqrt -1 failed: Numerical argument out of domain