Monday, December 1, 2008

“errno” is never reset

The external int variable errno contains the number of the most recent error or warning condition detected by the run-time library. To use this value, include the header file .

If no error or warning condition is detected, the value of errno is 0. After program execution starts, errno is never reset to 0 by the library. Programs that use errno for information about unusual conditions must set it to 0 before calling a library routine that may detect such a condition.

No comments: