In this section:
This error is generated whenever an uninitialized pointer is dereferenced.
Code Description Enabled Reported Platform WRITE_UNINIT_PTR Writing to an uninitialized pointer Runtime Windows/Unix
The following code attempts to use the value of the pointer
a, even though it has not been initialized.
Diagnosis at Runtime
- Line 2: Source line at which the problem was detected.
- Line 3: Description of the problem and the expression that is in error.
- Line 4: Stack trace showing the call sequence leading to the error.
- Line 6: Informational message indicating that a serious error has occurred which may cause the program to crash.
This problem is usually caused by omitting an assignment or allocation statement that would initialize a pointer. The code given, for example, could be corrected by including an assignment as shown below.