在Sun OS上,使用STL map时,有时系统会产生struct map 和class map冲突的问题。系统回报如下所示的错误:
/program/netopt/ACE_wrappers/ace/config-sunos5.10.h:64:30: warning: no newline at end of file
test.cpp: In function `int main()':
test.cpp:20: error: use of `map' is ambiguous
/usr/include/net/if.h:99: error: first declared as `struct map' here
/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../../include/c++/3.4.6/bit
s/stl_map.h:92: error: also declared as `template<class _Key, class _Tp, class
_Compare, class _Alloc> class std::map' here
此时需要在引用mapd的时候,加上命名空间前缀,即使用std::map。
分享到:
相关推荐
STL中map用法详解 STL中map用法详解 STL中map用法详解
C++ stl map algorithm ppt tutorial
学习STL MAP, STL SET之数据结构基础
stl中map用法详解
stl map algorithm ppt 精品课件
STL map例子 基本操作包括增删改查!
可以在windbg导出stl map和set的插件,使用方法参考我csdn的博客http://blog.csdn.net/yichigo/article/details/38232511
C++ stl中map容器的基本概念与增删查改功能实现
STL中map用法详解 非常详细,有说明和可以编译的例子
实现统计一段文章的每个单词的个数...其中CountDemo使用STL中的Map来实现的 CountDemo2是用一般语言实现,没有用到STL实现的; MapCount是用STL中的Vector和Map共同实现的 此题目是学习STL中的Map和Vector必练的经典题目
如果你具备一定的C++ template知识,即使你没有接触过STL,这个文章你也应该可能较轻易的看懂。
使用STL中的VECTOR LIST 容器实现学生管理系统,代码实现增删差改
C++11中有无序map即: unordered_map 可以不自动排序, 那么C++98中只有map 如何避免自动排序。
STL中map用法详解STL中map用法详解STL中map用法详解
以STL::map实现引用表,如有错误,欢迎指教!
STL的map例子agtbouns STL的map例子agtbouns
stl容器map的使用 包含6.0代码 以及详细的文档说明
C++中STL中的map用法详解,适合初学者彻底高清map用法,开发者备用查询map使用,已经map与其他容器的比较,map的使用特点和技巧
自己编写了STL库的map,供大家学习讨论
总结的STL中vector map list的使用方法和误区