INFO: Initializing in a Loop Within a Case Statement (86479)
The information in this article applies to:
- Microsoft Visual C++ 1.0
- Microsoft Visual C++ 1.5
- Microsoft Visual C++ 2.0
- Microsoft Visual C++ 4.0
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 5.0
This article was previously published under Q86479 SUMMARY
In the products listed above, the following errors can occur when you
define a variable in a loop that is within a case statement. The following
error occurs when "default" is the next case:
C2361 Initialization of 'x' is skipped by 'default' label
When default is not next, the following error appears:
C2360 Initialization of 'x' is skipped by 'case' label
A similar error also occurs when a goto is before the loop:
C2362 Initialization of 'x' is skipped by 'goto label name'
Modification Type: | Minor | Last Reviewed: | 7/5/2005 |
---|
Keywords: | kbcode kberrmsg kbinfo kbLangCPP KB86479 |
---|
|