What does "error: jump to case label [-fpermissive]" mean? (sorry for my english) [ANSWERED] | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What does "error: jump to case label [-fpermissive]" mean? (sorry for my english) [ANSWERED]

this error promted when i tried to use switch un c++

10th Feb 2018, 1:47 AM
javi
3 Answers
0
@javi You can use {} after a case label to prevent this error. This is similar to what is done with goto label and can solve the declaration problem. Eg : case 1: { int x = 5038; break; }
10th Feb 2018, 7:51 AM
Kinshuk Vasisht
Kinshuk Vasisht - avatar
+ 4
You should link your code so we can see the full thing and help more.
10th Feb 2018, 1:52 AM
J.G.
J.G. - avatar
+ 1
Yes, i was... took it all out and worked ok! thanks!! (didn't link the code because it was todo long)
10th Feb 2018, 2:18 AM
javi