char* p = "hello world"; // convert string const to char* char const* cstr = "looks great"; //OK
我在结构体中定义的是: struct Node { char Section[32]; }; 然后 printf("%s\n",Section); 编译器会提示: deprecated conversion from string constant to 'char*'' 请问这个该怎么修改? 谢谢! ……
引用 3 楼 的回复:额,错鸟!我上面的代码是不会有waring的。 代码时公司的,不能够贴。 谢谢大家! 那你们公司够水的。。。
64,642
社区成员
250,474
社区内容
加载中
试试用AI创作助手写篇文章吧