The information in this article applies to:
SYMPTOMSIf a constant expression that evaluates to zero is used to allocate an array, the following error occurs:
RESOLUTIONTo work around the problem, use a variable that is initialized to zero in place of the constant when allocating the array. 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++, 32-bit Edition, version 2.0. MORE INFORMATION
The operator new() can be called with the argument zero. A distinct (non-
null) pointer to an object will be returned (see Section 5.3.3 of the ARM -
M.A.Ellis, B.Stroustrup). This is the behavior observed with Visual C++
version 2.0.
Sample Code to Reproduce Problem
Additional query words: 1.00 1.50 7.00 8.00 8.00c
Keywords : kbCompiler kbCPPonly kbVC |
Last Reviewed: February 2, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |