BUG: Cannot Watch Undimensioned ArrayLast reviewed: July 17, 1997Article ID: Q93162 |
4.00 4.01 | 4.10
MS-DOS | WINDOWSkbtool kbbuglist The information in this article applies to:
SYMPTOMSThe versions of CodeView listed above do not properly display undimensioned arrays in C++ code, such as the argv formal parameter to the main() function. The array value does not appear in the locals window, if it is a local variable or function parameter. An attempt to place a quick watch on the array yields an error dialog box. A watch on the array yields a random integer value. In the Visual Workbench, and CVW, watching the first array element (array[0]) causes this error to appear in the watch window:
CXX0030: Error: expression cannot be evaluatedIn the locals window, the array will be displayed as:
[BP+0008] char * array[?] = 0xnnnn:0xnnnnSince the + symbol is not placed before "char", the pointer cannot be expanded.
RESOLUTIONModify the code to declare the array as a pointer to a pointer. For example, change
void main (int argc, char *argv[])to the following equivalent definition:
void main (int argc, char **argv) STATUSMicrosoft has confirmed this to be a problem in CodeView versions 4.0 and 4.01 for MS-DOS, and version 4.10 for Windows. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
|
Additional reference words: 4.00 4.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |