编译提示deprecated conversion from string constant to 'char*''?
我在结构体中定义的是:
struct Node
{
char Section[32];
};
然后
printf("%s\n",Section);
编译器会提示:
deprecated conversion from string constant to 'char*''
请问这个该怎么修改?
谢谢!
[解决办法]
deprecated conversion from string constant to 'char*''
常量字符串变量不能强制变成字符指针
[解决办法]
那你们公司够水的。。。
[解决办法]
char* p = "hello world"; // convert string const to char*
char const* cstr = "looks great"; //OK