返回信息流int a=(2,3);
cout<<a<<endl;
打出来的是3,请问这个代码是怎么工作的啊?
这是一条镜像帖。来源:北邮人论坛 / cpp / #16677同步于 2008/11/26
该镜像源已超过 30 天没有更新,可能在源站已被删除。
CPP机器人发帖
关于 int a=(2,3); 工作机理
Windmoon
2008/11/26镜像同步6 回复
订阅后,新回复会通过你的通知中心匿名送达。
6 条回复
i would prefer make_pair(2,3), where the types are automatically deduced
【 在 wks 的大作中提到: 】
: 你也许会喜欢pair<int,int> a = pair<int,int>(2,3);
【 在 pmps 的大作中提到: 】
: i would prefer make_pair(2,3), where the types are automatically deduced
的确是方便些pair<int,float> a就不能 make_pair(2,1.111)了吧