BUG: Using Referenced Integer to Access Array Generates CXX0034Last reviewed: July 14, 1997Article ID: Q168430 |
The information in this article applies to:
SYMPTOMSThe Visual C++ debugger generates the following error while using a referenced integer to access array.
"Error: CXX0034: types incompatible with operator"The MORE INFORMATION section below contains a sample showing this behavior.
RESOLUTIONThe workaround is not to use referenced integer a[i] to access array as shown in the sample. Use index value instead, as a[1].
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
Steps to Reproduce BehaviorBuild the following sample with debug information:
//test.cpp int func(int& i, int a[]) { return 0; } int main(void) { int a[] = {1, 2, 3}; int i = 1; func(i, a);// SET A BREAKPOINT HERE return 0; }Start the debugger with a breakpoint shown. If you now step into func() by hitting the F11 key and put a watch on "a[i]," you will get the error mentioned above. However, evaluating "i" and "a[1]" works just fine. |
Keywords : kberrmsg vcbuglist500 WBDebug
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |