"enumeration value 'xxxxx' not handled in switch"警告

问题描述:

使用switch结构时出现警告"enumeration value ‘xxxxx’ not handled in switch"
在这里插入图片描述

解决方案:

在switch结构末添加语句 default:break;
用来处理其他情况
在这里插入图片描述

发布了22 篇原创文章 · 获赞 2 · 访问量 1157

猜你喜欢

转载自blog.csdn.net/qinqinxiansheng/article/details/104984002