ID: Q102166
1.00 | 1.00
WINDOWS | WINDOWS NT
kbtool kbbuglist kbfixlist kbfasttip
The information in this article applies to:
- Microsoft Visual C++ for Windows, version 1.0
- Microsoft Visual C++, 32-bit Edition, version 1.0
An attempt to expand a local variable in the Local or Watch window may fail and display incorrect values.
The data type of the local variable uses nested classes.
To work around this problem, specify the /Z7 compiler option switch when you build the application.
Microsoft 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.
When 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.
/*
* 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
KBCategory: kbtool kbfixlist kbfasttip kbbuglist
KBSubcategory: CPPIss
Keywords : kb16bitonly kbCompiler kbCPPonly kbVC kbbuglist kbfixlist
Version : 1.00 | 1.00
Platform : NT WINDOWS
Solution Type : kbfix
Last Reviewed: September 20, 1997