FIX: Cannot Evaluate Structures in ClassesLast reviewed: September 19, 1997Article ID: Q143050 |
|
4.00
WINDOWS NT
kbtool kbbuglist kbfixlist
The information in this article applies to:
SYMPTOMSThe Visual C++ version 4.0 debugger cannot evaluate structures that are defined and declared inside a class when C7-compatible debugging information is generated. In the Auto window you will get this error:
CXX0030: Error: expression cannot be evaluated.In the QuickWatch window you will get this error:
CXX0017: Error: symbol "CMyClass::MyStruct" not found. RESOLUTIONUse the /Zi compiler switch (Program Database) or make the structure definition global.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug was corrected in Visual C++ 4.1.
MORE INFORMATION
Sample Code to Reproduce Problem
/* Compile options needed: /Z7 */ #include <string.h>class CMyClass { int myInt;
struct MyStruct
{
char string[30];
};
MyStruct myStruct;
public:
CMyClass()
{
myInt = 5;
strcpy(myStruct.string, "Hello");
} // Set Break Point here
};
void main()
{
CMyClass c;}
|
Additional reference words: 4.00 4.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |