编译时出现的警告

zhuzhu3192003 2008-04-25 09:34:51
我在编译文件时出现如下警告信息:
C:\MICROSOFT VISUAL STUDIO\VC98\INCLUDE\xtree(72) : warning C4284: return type for 'std::_Tree<class CppUnit::TestFactory *,class CppUnit::TestFactory *,struct std::set<class CppUnit::TestFactory *,struct std::less<class CppUnit::TestFactory *>,clas
s std::allocator<class CppUnit::TestFactory *> >::_Kfn,struct std::less<class CppUnit::TestFactory *>,class std::allocator<class CppUnit::TestFactory *> >::const_iterator::operator ->' is 'class CppUnit::TestFactory *const * ' (ie; not a UDT or refe
rence to a UDT. Will produce errors if applied using infix notation)
C:\MICROSOFT VISUAL STUDIO\VC98\INCLUDE\set(33) : see reference to class template instantiation 'std::_Tree<class CppUnit::TestFactory *,class CppUnit::TestFactory *,struct std::set<class CppUnit::TestFactory *,struct std::less<class CppUnit
::TestFactory *>,class std::allocator<class CppUnit::TestFactory *> >::_Kfn,struct std::less<class CppUnit::TestFactory *>,class std::allocator<class CppUnit::TestFactory *> >' being compiled
..\..\include\cppunit/extensions/TestFactoryRegistry.h(172) : see reference to class template instantiation 'std::set<class CppUnit::TestFactory *,struct std::less<class CppUnit::TestFactory *>,class std::allocator<class CppUnit::TestFactory
*> >' being compiled
C:\MICROSOFT VISUAL STUDIO\VC98\INCLUDE\xtree(127) : warning C4284: return type for 'std::_Tree<class CppUnit::TestFactory *,class CppUnit::TestFactory *,struct std::set<class CppUnit::TestFactory *,struct std::less<class CppUnit::TestFactory *>,cla
ss std::allocator<class CppUnit::TestFactory *> >::_Kfn,struct std::less<class CppUnit::TestFactory *>,class std::allocator<class CppUnit::TestFactory *> >::iterator::operator ->' is 'class CppUnit::TestFactory ** ' (ie; not a UDT or reference to a
UDT. Will produce errors if applied using infix notation)
C:\MICROSOFT VISUAL STUDIO\VC98\INCLUDE\set(33) : see reference to class template instantiation 'std::_Tree<class CppUnit::TestFactory *,class CppUnit::TestFactory *,struct std::set<class CppUnit::TestFactory *,struct std::less<class CppUnit
::TestFactory *>,class std::allocator<class CppUnit::TestFactory *> >::_Kfn,struct std::less<class CppUnit::TestFactory *>,class std::allocator<class CppUnit::TestFactory *> >' being compiled
..\..\include\cppunit/extensions/TestFactoryRegistry.h(172) : see reference to class template instantiation 'std::set<class CppUnit::TestFactory *,struct std::less<class CppUnit::TestFactory *>,class std::allocator<class CppUnit::TestFactory
*> >' being compiled
C:\MICROSOFT VISUAL STUDIO\VC98\INCLUDE\vector(156) : warning C4018: '<' : signed/unsigned mismatch
C:\MICROSOFT VISUAL STUDIO\VC98\INCLUDE\vector(156) : while compiling class-template member function 'void __thiscall std::vector<unsigned int,class std::allocator<unsigned int> >::insert(unsigned int *,unsigned int,const unsigned int &)'
C:\MICROSOFT VISUAL STUDIO\VC98\INCLUDE\vector(167) : warning C4018: '<' : signed/unsigned mismatch
C:\MICROSOFT VISUAL STUDIO\VC98\INCLUDE\vector(156) : while compiling class-template member function 'void __thiscall std::vector<unsigned int,class std::allocator<unsigned int> >::insert(unsigned int *,unsigned int,const unsigned int &)'

可是我已经应用了相关的库了,为什么还会出现上面的警告信息呢?
主要是我在加入有关动态数组的代码时出现的,但是我想还是最好用动态数组,哪位高人帮我解决一下?
...全文
158 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
meiZiNick 2008-05-01
  • 打赏
  • 举报
回复
好像没那么简单,呵呵.
knowledge_Is_Life 2008-04-30
  • 打赏
  • 举报
回复
都是很好的建议! 值得学习
我啃 2008-04-26
  • 打赏
  • 举报
回复
STL在VC编译器上一般都有很多没有大碍的警告,可以disable掉
hurryboylqs 2008-04-26
  • 打赏
  • 举报
回复
STL的警告 应该没什么大碍

15,471

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 进程/线程/DLL
社区管理员
  • 进程/线程/DLL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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