This warning is indicating that there is a line in the code where a string literal (a sequence of characters in double quotes) is being assigned to a char pointer without being explicitly casted. In C++11, this is not allowed as it can lead to unexpected behavior and security vulnerabilities.

To fix the warning, you can either declare the char pointer as a const char pointer or use the string class instead. For example:

// Option 1 - Using const char pointer const char* message = "Hello World";

// Option 2 - Using string class std::string message = "Hello World"

commfncpp921 warning ISO C++11 does not allow conversion from string literal to char

原文地址: https://www.cveoy.top/t/topic/eCyV 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录