c - 警告 : left-hand operand of comma expression has no effect

标签 c compiler-construction warnings

我看到这个警告 如何解决?

Temp += (Table[i, temp3] - (MSB[i] ^ 0x1));

警告:逗号表达式的左侧操作数无效

最佳答案

什么是表对象?如果它是二维数组那么你应该写

Table[i][temp3]

在你的代码中

[i, temp3]

是一个逗号运算符 - 它计算第一个参数 (i),忽略它并返回 temp3,因此如果 Table 是某种接受单索引访问其对象的容器,您可以删除 i

关于c - 警告 : left-hand operand of comma expression has no effect,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3943861/

相关文章:

python - 使用 .loc 设置WithCopyWarning

c++ - 使用 C++ fork() 并创建父级的 4 个子级

c - 对包含数组的结构使用 free()

c - 在C中打印字符串中的所有字符

c++ - 为什么 C 或 C++ 标准不明确将 char 定义为有符号或无符号?

php - "Notice: Undefined variable"、 "Notice: Undefined index"、 "Warning: Undefined array key"和 "Notice: Undefined offset"使用 PHP

mysql - 警告 : Skipping the data of table mysql. 事件

c - 尝试使用扑克游戏的冒泡排序方法对 C 中的值进行排序

java - 让编译器通过重载方法来完成工作是行不通的

regex - 莱克斯/雅克 : using global variables and finding the longest occurance