关于case语句中声明变量并初始化的注意事项
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了关于case语句中声明变量并初始化的注意事项相关的知识,希望对你有一定的参考价值。
今天看到一句对这个问题特别精辟的总结,记录如下:
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 (8.5).
以上是关于关于case语句中声明变量并初始化的注意事项的主要内容,如果未能解决你的问题,请参考以下文章