int main()
{
cin.tie(&cout);//tie函數可用istream或ostream對象調用
ostream *old_tie=cin.tie();//使用一個指向ostream對象的指針形參
//cin.tie()返回當前所綁定的對象
*cin.tie()<<"hello world"<<endl;//輸出hello world
cin.tie(0);//打破該流上已存在的對象
//*cin.tie()<<"hello world"<<endl; error
system("pause");
}