Article ID: 122543 - Last Review: July 5, 2005 - Revision: 1.1 BUG: Incorrect Code When Increment Pointer Based on a PointerThis article was previously published under Q122543 On This PageSYMPTOMS
Incorrect code is generated when an assignment is made in the same
statement where a pointer based on a pointer is incremented.
For example, executing the following code:
run-time error R6001
-null pointer assignment
CAUSE
The compiler generates an unnecessary sub command, as shown here:
RESOLUTION
Split the statement into multiple lines. For example,
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. MORE INFORMATION
The following sample demonstrates both the problem and its solution.
Sample CodeAPPLIES TO
| Article Translations
|
Back to the top
