关于三目运算
  • 板块灌水区
  • 楼主HX_ztx
  • 当前回复39
  • 已保存回复39
  • 发布时间2023/7/19 15:53
  • 上次更新2023/11/3 08:52:15
查看原帖
关于三目运算
945933
HX_ztx楼主2023/7/19 15:53
!enemy[x] ? enemy[x]=find(y) :j(y,enemy[x]) ; 
!enemy[y] ? enemy[y]=find(x) : j(x,enemy[y]) ;

上述enemy[]为数组,find()为void函数 j( ,)为void函数;

BUT

[Error]third operand to the conditional operator is of type 'void', but the second operand is neither a throw-expression nor of type 'void'

2023/7/19 15:53
加载中...