在STL中 typedef pair text_loc;是什么意思。

ywchen2000 2003-09-29 11:34:16
在STL中 typedef pair<text*,loc*> text_loc;是什么意思。
...全文
172 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
ywchen2000 2003-09-29
  • 打赏
  • 举报
回复
这我知道呀问题是pair<text*,loc*>是什么东西呀
ssbull 2003-09-29
  • 打赏
  • 举报
回复
写了typedef pair<text*,loc*> text_loc
你在声明或定义一个pair<text*,loc*> 变量时,就可以用text_loc来代替pair<text*,loc*>
sevecol 2003-09-29
  • 打赏
  • 举报
回复
text_loc 就代表pair<text*,loc*>

pair保存这两个指针,一个text*一个loc*

sevecol 2003-09-29
  • 打赏
  • 举报
回复
template<class Type1, class Type2>
struct pair
{
typedef Type1 first_type;
typedef Type2 second_type
Type1 first;
Type2 second;
pair( );
pair(
const Type1& __Val1,
const Type2& __Val2
);
template<class Other1, class Other2>
pair(
const pair<Other1, Other2>& _Right
);
};

24,854

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 工具平台和程序库
社区管理员
  • 工具平台和程序库社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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