为什么声明const int8_t* cstr = "asdf";
给出错误
invalid conversion from ‘const char*’ to ‘const int8_t*’
Aren't int8_t*
and char*
相同的?
我在这里错过了一些微妙的事情吗?
const signed char*
不等于const char*
。检查你的编译设置,因为这可以解释它。int8_t
总是(永远不要说永远=)至少在我见过的所有地方)定义为signed char
.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)