warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

时间:2021-04-05 16:04:57
E:\Work Place\Qt\Qt Quick\iMac\voiceSetting\include\public.h:9: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 char* sliderBorderColor=     "#808080";

                              ^


static const char* sliderBorderColor=     "#808080";

提示程序员,此处很容易出现越界错误!