首页| 论坛| 消息
主题:Qt6中负数与char兼容问题
mugua001发表于 2024-01-13 16:42
Qt5.8 可以编译通过,换成Qt6.6.1之后报这个错误。(AES加密函数中用到的数组)
error: constant expression evaluates to -14 which cannot be narrowed to type 'char'
---------------------------------------------
onst char sm_S[256] =
{ 99, 124, 119, 123, -14, 107, 111, -59, 48, 1, 103, 43, -2, -41, -85, 118, -54,......};
回帖(2):
2楼:realfan:char改成signed char试试 (2024-01-15 10:07) 
大神的方法果然 有效。
1楼:char改成signed char试试

全部回帖(2)»
最新回帖
收藏本帖
发新帖