Did you know that you can navigate the posts by swiping left and right?
Ever wonder what will happen if a switch meets a for ?
Magic …
int main() {
int a = 2;
int i;
switch(a) {
for(i=0;i<5;i++){
case 1:
std::cout << "foo" << std::endl;
continue;
case 2:
std::cout << "bla" << std::endl;
continue;
default:
std::cout << "bar" << std::endl;
}
}
return 0;
}
The result is kinda surprising:
(Magic is not to be demonstrated :P )
bar
foo
foo
foo
foo
glhf