C++ 编译错误 jump to case label [-fpermissive]

《花的微笑》--- 钢琴曲,石进

今天再用C++写代码时,出现了编译错误 jump to case label [-fpermissive]

原因:使用switch语句时,再case中定义了变量,编译器不愿意!   将变量的定义移出switch case; 不要在if或case下定义变量;

ref: 
https://blog.csdn.net/xianxjm/article/details/73457388


猜你喜欢

转载自blog.csdn.net/qq_35865125/article/details/80753560
今日推荐