FIX: Incorrect Debugging Information for Nested ClassesLast reviewed: September 16, 1997Article ID: Q102166 |
1.00 | 1.00WINDOWS | WINDOWS NT kbtool kbbuglist kbfixlist kbfasttip The information in this article applies to:
SYMPTOMSAn attempt to expand a local variable in the Local or Watch window may fail and display incorrect values.
CAUSEThe data type of the local variable uses nested classes.
RESOLUTIONTo work around this problem, specify the /Z7 compiler option switch when you build the application.
STATUSMicrosoft has confirmed this to be a problem in the C/C++ Compiler (CL.EXE) version 8.0 for Windows. This problem was corrected in C/C++ compiler version 8.0c, included in Visual C++ for Windows, version 1.5.
MORE INFORMATIONWhen you debug the code example below in Visual C++ version 1.0, the local objects a and b refer to nested class C defined in class A when you expand the objects. This problem does not occur in Microsoft C/C++ version 7.0 for MS-DOS.
Sample Code
/* * Compiler options needed: /Zi /Od */class A { public: class C { public: int *a; }; C *temp;}; class B { public: class C { public: float *a; }; C *temp;};
void main(void){ A a; B b; // b refers to nested class C defined in class A } |
Additional reference words: 1.00 8.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |