नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
initialization of 'identifier' is skipped by 'goto label'
Remarks
When compiled by using /Za, a jump to the label prevents the identifier from being initialized.
You can only jump past a declaration with an initializer if the declaration is enclosed in a block that isn't entered, or if the variable has already been initialized.
Example
The following example generates C2362:
// C2362.cpp
// compile with: /Za
int main() {
goto label1;
int i = 1; // C2362, initialization skipped
label1:;
}
Possible resolution:
// C2362b.cpp
// compile with: /Za
int main() {
goto label1;
{
int j = 1; // OK, this block is never entered
}
label1:;
}