摘要: 第1~3章 略std::pair 是一个 struct ,定义于 bits/stl_pair.h 文件中,被包含进 <utility> 头文件中。std::make_pair(42,'@') //相当于 std::pair<int,char> (42,'@')std::pair<int,int> p = std::make_pair(42,3.3); //42,3任何函数需要返回两个值,必须使用 pair; 标准程序库中 map 和 multimap 容器的元素型别也是 pair。std::auto_ptr<int> 阅读全文
posted @ 2013-05-07 15:29 轻典 阅读(241) 评论(0) 推荐(0) 编辑