请教multimap 的问题

hnuhwk 2007-10-31 10:24:16
我写了一个小程序
用multimap来排序 multimap<int,Stop*>* Passstop;
关键码是int型的
而另外一个是指针
指向一个对象
没有查找时插入可以成功,仅仅是有警告
在通过匹配关键码来得到一个特定的stop*时(我也不太清楚是否可以得到一个stop*,是否multimap里面存储了我插进去的stop*)不仅警告了,连编译都通不过
错误如下::\program files\microsoft visual studio\vc98\include\map(206) : warning C4786: 'std::reverse_bidirectional_iterator<std::_Tree<int,std::pair<int const ,Stop *>,std::multimap<int,Stop *,std::less<int>,std::allocator<Stop *> >::_Kfn,std::less<int>,st
d::allocator<Stop *> >::iterator,std::pair<int const ,Stop *>,std::pair<int const ,Stop *> &,std::pair<int const ,Stop *> *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\map(206) : while compiling class-template member function '__thiscall std::multimap<int,Stop *,std::less<int>,std::allocator<Stop *> >::std::multimap<int,Stop *,std::less<int>,std::alloca
tor<Stop *> >(const std::less<int> &,const std::allocator<Stop *> &)'
c:\program files\microsoft visual studio\vc98\include\map(206) : warning C4786: 'std::reverse_bidirectional_iterator<std::_Tree<int,std::pair<int const ,Stop *>,std::multimap<int,Stop *,std::less<int>,std::allocator<Stop *> >::_Kfn,std::less<int>,st
d::allocator<Stop *> >::const_iterator,std::pair<int const ,Stop *>,std::pair<int const ,Stop *> const &,std::pair<int const ,Stop *> const *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\map(206) : while compiling class-template member function '__thiscall std::multimap<int,Stop *,std::less<int>,std::allocator<Stop *> >::std::multimap<int,Stop *,std::less<int>,std::alloca
tor<Stop *> >(const std::less<int> &,const std::allocator<Stop *> &)'
c:\program files\microsoft visual studio\vc98\include\map(206) : warning C4786: 'std::pair<std::_Tree<int,std::pair<int const ,Stop *>,std::multimap<int,Stop *,std::less<int>,std::allocator<Stop *> >::_Kfn,std::less<int>,std::allocator<Stop *> >::it
erator,std::_Tree<int,std::pair<int const ,Stop *>,std::multimap<int,Stop *,std::less<int>,std::allocator<Stop *> >::_Kfn,std::less<int>,std::allocator<Stop *> >::iterator>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\map(206) : while compiling class-template member function '__thiscall std::multimap<int,Stop *,std::less<int>,std::allocator<Stop *> >::std::multimap<int,Stop *,std::less<int>,std::alloca
tor<Stop *> >(const std::less<int> &,const std::allocator<Stop *> &)'
c:\program files\microsoft visual studio\vc98\include\map(206) : warning C4786: 'std::pair<std::_Tree<int,std::pair<int const ,Stop *>,std::multimap<int,Stop *,std::less<int>,std::allocator<Stop *> >::_Kfn,std::less<int>,std::allocator<Stop *> >::co
nst_iterator,std::_Tree<int,std::pair<int const ,Stop *>,std::multimap<int,Stop *,std::less<int>,std::allocator<Stop *> >::_Kfn,std::less<int>,std::allocator<Stop *> >::const_iterator>' : identifier was truncated to '255' characters in the debug inf
ormation
c:\program files\microsoft visual studio\vc98\include\map(206) : while compiling class-template member function '__thiscall std::multimap<int,Stop *,std::less<int>,std::allocator<Stop *> >::std::multimap<int,Stop *,std::less<int>,std::alloca
tor<Stop *> >(const std::less<int> &,const std::allocator<Stop *> &)'
C:\Documents and Settings\Administrator\桌面\dd\dd.cpp(335) : error C4716: 'Road::printroad' : must return a value
c:\program files\microsoft visual studio\vc98\include\xtree(160) : warning C4786: 'std::_Tree<int,std::pair<int const ,Stop *>,std::multimap<int,Stop *,std::less<int>,std::allocator<Stop *> >::_Kfn,std::less<int>,std::allocator<Stop *> >::_Tree<int,
std::pair<int const ,Stop *>,std::multimap<int,Stop *,std::less<int>,std::allocator<Stop *> >::_Kfn,std::less<int>,std::allocator<Stop *> >' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\utility(21) : warning C4786: 'std::pair<std::_Tree<int,std::pair<int const ,Stop *>,std::multimap<int,Stop *,std::less<int>,std::allocator<Stop *> >::_Kfn,std::less<int>,std::allocator<Stop *> >:
:iterator,bool>::pair<std::_Tree<int,std::pair<int const ,Stop *>,std::multimap<int,Stop *,std::less<int>,std::allocator<Stop *> >::_Kfn,std::less<int>,std::allocator<Stop *> >::iterator,bool>' : identifier was truncated to '255' characters in the d
ebug information
Error executing cl.exe.

dd.exe - 1 error(s), 6 warning(s)

不知道什么原因,那位给我讲讲
谢谢!
...全文
116 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
hnuhwk 2007-11-03
  • 打赏
  • 举报
回复
明白了
xugang_2001 2007-11-01
  • 打赏
  • 举报
回复
才1个error紧张什么
飞哥 2007-11-01
  • 打赏
  • 举报
回复
个人觉得你这一定是个小错误

error C4716: 'Road::printroad ' : must return a value
飞哥 2007-11-01
  • 打赏
  • 举报
回复
先用

#pragma warning(disable:4786)去掉警告,看着太乱了
  • 打赏
  • 举报
回复
看看你上面贴的代码乱成什么样了,谁看得懂?

65,210

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

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