社区讨论

关于三目运算

灌水区参与者 8已保存回复 39

讨论操作

快速查看讨论及其快照的属性,并进行相关操作。

当前回复
39 条
当前快照
1 份
快照标识符
@lo2639tw
此快照首次捕获于
2023/10/23 08:36
2 年前
此快照最后确认于
2023/11/03 08:52
2 年前
查看原帖
CPP
!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

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

回复

39 条回复,欢迎继续交流。

正在加载回复...