小编Che*_*pes的帖子

不断收到警告“建议在 '||' 内的 '&&' 周围使用括号 对于C程序

 printf(" 1|        %d       |         %d         |       %d    |   %d  |     %d\n", 
    ((coffee_strength == 'm' || coffee_strength == 'M') && 
     (coffee1_type == 'l' || coffee1_type == 'L') || 
     (coffee_strength == 'r' || coffee_strength == 'R') && 
     (coffee1_type == 'b' || coffee1_type == 'B')), 
    ((coffee_maker == 'r' || coffee_maker == 'R') && 
     (coffee1_grindSize == 'c' || coffee1_grindSize == 'C') ||
     (coffee_maker == 'C' || coffee_maker == 'c') &&
     (coffee1_grindSize == 'f' || coffee1_grindSize == 'F')),
    ((coffee_servings >= 1) && (coffee_servings <= 4) …
Run Code Online (Sandbox Code Playgroud)

c compiler-warnings parentheses

0
推荐指数
1
解决办法
1338
查看次数

标签 统计

c ×1

compiler-warnings ×1

parentheses ×1