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 -

sql server - SQL Query - Delete duplicates if more than 3 dups? -

c# 3.0 - Issue with getting 2 chars from string using indexer -