c++ - where to put break in switch/case statement with blocks -


When I use the braces in the code in the code case in C ++ to move the variable If I do inside or out of the block

  the matter is between FOO: // 'break' {int i; to work(); break; } Case bar: // Exit 'break' {int i; to work(); }   break;  

Thanks.

It's a matter of style.

To make it more readable, just put break outside the closing brace.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -