C++ Builder 中怎么使用Hash_map,hash_set
#include <hash_map>
#include <map>
#include <vector>
#include <Generics.collections.hpp>
#include <iostream>
hash_map<const char*, int, hash<const char*>, eqstr> months;
months["january"] = 31;
months["february"] = 28;
months["march"] = 31;
months["april"] = 30;
months["may"] = 31;
months["june"] = 30;
months["july"] = 31;
months["august"] = 31;
months["september"] = 30;
months["october"] = 31;
months["november"] = 30;
months["december"] = 31;编译报错 hash_map报错。
...全文
相关推荐
C++Builder数据结构程序集合.rar
C++Builder中,map和unordered_map可以用来实现关联数组,即键值对的哈希表。6.
c++builder数据结构算法
STL提供了一套标准的数据结构(如vector、list、set、map)和算法库,可以大大简化我们的工作。例如,vector可以看作动态数组,list是双向链表,set和map则是基于红黑树的集合。
stlport 2.032
扩展组件:除了标准库的组件,STLport还引入了额外的数据结构和算法,如hash表,这是一种用于快速查找的容器,通常比标准的map或set有更快的插入和查找速度。
CPP-STL.rar_STL_C++_Builder_
set和map是关联容器,它们内部使用红黑树实现,提供了快速的查找、插入和删除操作。set存储唯一元素,而map则将键值对映射到特定的值。
c++builder 使用Com的例子
在C++Builder中,可以使用IDL(Interface Definition Language)文件来定义接口。


