请看这行语句,小问题

ck_chuyun 2002-10-18 03:32:56
locations->push_back(make_pair(line_pos, word_pos));
请问这个make_pair(......)是什么东西????
...全文
21 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
arcsiny 2002-10-18
  • 打赏
  • 举报
回复
拿来用的
可以F12啊
srm2000 2002-10-18
  • 打赏
  • 举报
回复
make_pair(x,y) creates a pair by deducing and returning the types of x and y.


template <class T1, class T2>
struct pair {
typedef T1 first_type;
typedef T2 second_type;
T1 first;
T2 second;
pair();
pair (const T1&, const T2&);
template <class V, class U>
pair (const pair <V, U>& p);
~pair();
};

69,382

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧