warning C4018: “<”: 有符号/无符号不匹配
出错代码     for(int j=0;j<detector.size();j++)

出错原因分析:

detector 是一个Vector容器 ,detecot.size() 在容器说明中 被定义为: unsigned int 类型, 而j是int 类型 所以会出现: 有符号/无符号不匹配 警告


错误改正 : 定义j为unsigned 类型后就可以了

即: for(unsigned int j=0;j<detector.size();j++)

相关文章:

  • 2021-10-25
  • 2021-10-29
  • 2021-09-04
  • 2022-12-23
  • 2021-12-03
  • 2021-11-29
  • 2021-07-15
猜你喜欢
  • 2022-02-05
  • 2021-06-23
  • 2022-03-10
  • 2022-12-23
  • 2021-07-18
  • 2021-05-19
  • 2021-12-02
相关资源
相似解决方案