BUG: Using Referenced Integer to Access Array Generates CXX0034ID: Q168430
|
The Visual C++ debugger generates the following error while using a referenced integer to access array.
The MORE INFORMATION section below contains a sample showing this behavior.Error: CXX0034: types incompatible with operator
The workaround is not to use referenced integer a[i] to access array as shown in the sample. Use index value instead, as a[1].
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.
//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;
}
Additional query words:
Keywords : kberrmsg kbDebug kbide kbVC500bug kbVC600bug
Version : winnt:4.0,4.1,4.2,5.0,6.0
Platform : winnt
Issue type : kbbug
Last Reviewed: May 17, 1999