摘要: 控制C++的Stream的格式,主要有三种方法,操作flag、使用manipulator和使用stream的成员函数。Manipulatormanipulator本质是一个函数,但是由于Stream类对<<做了重载,所以可以使用<<调用manipulator,看起来十分赏心悦目。ostream& operator << (ostream& (*op)(ostream& strm)){ // ostream& (*op)(ostream&) - 返回值为ostream&, 参数类型为ostream&的一个 阅读全文
posted @ 2012-07-25 16:06 斯啦丝拉 阅读(2670) 评论(0) 推荐(0) 编辑