//--《C++捷径教程》读书笔记--Chapter 18--C++的I/O系统
//--Chapter 18--C++的I/O系统
//--10/15/2006 Sun.
//--Computer Lab
//--Liwei
//说明插入符的用法
#include <iostream>
using namespace std;
class three_d{
public:
int x,y,z;
three_d(int a, int b, int c){ x=a; y=b; z=c; }
};
ostream &operator<<( ostream &stream, three_d obj )
{
stream << obj.x << ",";
stream << obj.y << ",";
stream << obj.z << "/n";
return stream;
}
int main()
{
three_d a(1,2,3), b(4,5,6), c(7,8,9);
cout << a << b << c;
return 0;
}