条件表达式的语法

来源:互联网 发布:java输出当前系统时间 编辑:程序博客网 时间:2024/05/01 02:39
cout << (true?"1a":1) << endl; //worong
cout << (true?1: "1") << endl; //worong
cout << (true?"1a":"1") << endl; //right
cout << (true?2:1) << endl; //worong
 
原创粉丝点击