您的位置:首页 > 其它

A Tour of the Standard Library

2010-06-12 10:17 603 查看
花了点时间看了一下A Tour of the Standard Library,发现C++作者写得非常的详细,易懂,不知道以前为什么没有看这么好的东西。

这章里面以前没有接触到的就是输入输出流的迭代器操作,很有意思,如下代码:

int _tmain(int argc, _TCHAR* argv[])
{
ostream_iterator<string> oo(cout);
*oo="What's your name?";
istream_iterator<string> ii(cin);
string str=*ii;
*oo="hello ";
*oo=str;
*oo="\n";
return 0;
}
winxos 2010-02-10 11:18

本文出自 “winxosのcoding world” 博客,请务必保留此出处http://winxos.blog.51cto.com/1671107/330888
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐