| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 3467 人关注过本帖
标题:我这三目运算为啥不行?
只看楼主 加入收藏
Sillydog
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2018-4-19
收藏
得分:0 
回复 8楼 lin5161678
哦哦,多谢指教
2018-06-21 08:19
星泪成寒
Rank: 7Rank: 7Rank: 7
等 级:黑侠
威 望:6
帖 子:77
专家分:549
注 册:2013-5-19
收藏
得分:4 
C语言标准定义 6.5.15 Conditional operator后2个表达式结果是同样(或兼容)的类型(包含void).
程序代码:
One of the following shall hold for the second and third operands:
— both operands have arithmetic type;
— both operands have the same structure or union type;
— both operands have void type;
— both operands are pointers to qualified or unqualified versions of compatible types;
— one operand is a pointer and the other is a null pointer constant; or
— one operand is a pointer to an object type and the other is a pointer to a qualified or unqualified version of void.


2018-06-21 09:41
快速回复:我这三目运算为啥不行?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.061142 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved