Visual Studio 报错:
const char *”类型的值不能用于初始化“char *”类型的实体错误
解决办法:
1,强制类型转换,例如:
char * Singer::pv[] = {(char*)"other", (char*)"alto", (char*)"contralto",(char*)"soprano", (char*)"bass", (char*)"baritone", (char*)"tenor"};
2,项目 -> 属性 -> C/C++ -> 语言 -> 符合模式,将符合模式由是
改为否
3、将:
char* inparam = "D:\\0_code\\quantize\\model\\yolov4_opt.param";
改成:
char inparam[] = "D:\\0_code\\quantize\\model\\yolov4_opt.param";