Many C and C++ run-time library functions have a return value associated with them for error-checking purposes. For example:
For information about the ILE C/C++ function return values, see ILE C/C++ Run-Time Library Functions.
To verify that each run-time library function has completed successfully, a program should check the function return values.
Example:
The following figure shows how to check the return value of the fopen() function.
Figure 160. ILE C Source to Check for the Return Value of fopen()
|
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.