没有说反呀,第一种报错,第二种编译能通过。
找了点材料,好像是什么变量呀,初始化呀,跳转呀,搞的问题。谁给翻译下,看的懵懵懂懂的
It is possible to transfer into a block, but not in a way that bypasses declarations with initialization. A program that jumps from a point where a local variable with automatic storage duration is not in scope to a point where it is in scope is ill-formed unless the variable has POD type (3.9) and is declared without an initializer. (The transfer from the condition of a switch statement to a case label is considered a jump in this respect.)