c++ - where to put break in switch/case statement with blocks -
When I use the braces in the code in the code Thanks. 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;
It's a matter of style.
To make it more readable, just put break
outside the closing brace.
Comments
Post a Comment