The information in this article applies to:
SYMPTOMSAn attempt to compile the Sample Code below as a C++ file with one of the compilers listed above will fail and generate the following message:
CAUSEThis error occurs because the "case" and "default" labels do not limit scope; instead, each one is a structured goto and suffers the same limitations with respect to control flow. In the example below, the symbol "i" remains in scope in subsequent "case" clauses. However, if the flow of control is transferred to these clauses, the object was not initialized. The C++ language requires determining possible control flow errors through a static analysis of the code. RESOLUTIONTwo possible solutions are:
-or- MORE INFORMATIONThe compiler-generated error described above is correct. This behavior is required by the C++ language. Sample Code
Additional query words: 8.00 8.00c 9.00 9.10
Keywords : kbCompiler kbCPPonly kbVC100 kbVC150 kbVC151 kbVC152 kbVC200 kbVC210 kbVC400 kbVC410 kbVC420 kbVC500 |
Last Reviewed: July 6, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |