Hi. I am getting the 'break not working in a function within a switch or loop' error under someFunction(). My code looks something like this
Why does it say that the break; is not within a switch when someFunction is within a switch? How do I fix this?Code:do { switch(choice) { case 1: if(a==1) { someFunction(derp1, derp2, derp3); } } }
Code:void someFunction(int derp1, int derp2, int derp3) { if(derp1==1) { /*blah blah blah*/ break; } }