use*_*703 3 c warnings strcat
我试图连接两个const char*字符串.
当我有一个声明,就像strcat(a,b)我得到警告expected ‘char * restrict’ but argument is of type ‘const char *’
strcat(a,b)
expected ‘char * restrict’ but argument is of type ‘const char *’
有没有办法调用不会产生警告的strcat?谢谢!
Mys*_*ial 8
strcat()修改第一个操作数.因此它不可能const.但是你通过了它const char*.
strcat()
const
const char*
所以你不能strcat()在两个const *char字符串上使用.
const *char
归档时间:
14 年,4 月 前
查看次数:
4677 次
最近记录: