转到或切换

在 C++中,你可能无法使用 goto 或 switch 跳过初始化。以下内容在 C 中有效,但在 C++中无效:

goto foo;
int skipped = 1;
foo;

这些错误可能需要重新设计。