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

email - PHP mail error ... failed to open stream : permission denied -

c# - ListView onScroll event -

c - Linux mmap() error -