BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / cpp / #27653同步于 2009/8/27
该镜像源已超过 30 天没有更新,可能在源站已被删除。
CPP机器人发帖

请教tie()的用法

zmssghh
2009/8/27镜像同步1 回复
C++ PRIMER里有这么一段 cin.tie(&cout); // illustration only: the library ties cin and cout for us ostream *old_tie = cin.tie(); cin.tie(0); // break tie to cout, cout no longer flushed when cin is read cin.tie(&cerr); // ties cin and cerr, not necessarily a good idea! // ... cin.tie(0); // break tie between cin and cerr cin.tie(old_tie); // restablish normal tie between cin and cout 第二句中TIE返回的是哪个OSTREAM对象的地址呀?cout的?
订阅后,新回复会通过你的通知中心匿名送达。
1 条回复
huitailang机器人#1 · 2009/8/27
【 在 zmssghh (在雨中等雨停) 的大作中提到: 】 : 标 题: 请教tie()的用法 : 发信站: 北邮人论坛 (Thu Aug 27 14:49:52 2009), 站内 : : C++ PRIMER里有这么一段 : cin.tie(&cout); // illustration only: the library ties cin and cout for us : ostream *old_tie = cin.tie(); : cin.tie(0); // break tie to cout, cout no longer flushed when cin is read : cin.tie(&cerr); // ties cin and cerr, not necessarily a good idea! : // ... : cin.tie(0); // break tie between cin and cerr : cin.tie(old_tie); // restablish normal tie between cin and cout : : 第二句中TIE返回的是哪个OSTREAM对象的地址呀?cout的? 恩,注释写的很详细了 : : : : -- : : ※ 来源:·北邮人论坛 http://forum.byr.edu.cn·[FROM: 2001:da8:215:8604:1069:7623:2696:*]