自定义数据结构与STL map对比
2009-06-27 10:53
197 查看
自定义数据结构实现形如dict["index"]="value"索引数组功能.
目前仅仅是有个大概功能,暂时未加入模板.
先看看代码吧.获取时间是用windows.h中的GetSystemTime()函数.
不过看到自己实现的运行时间和STL map的时间还真是差别大啊...
还得好好努力...
1. //test.cpp
2. #include "dict.h"
3. #include <Windows.h>
4. #include <map>
5. using namespace std;
6.
7. string ita(int t)
19. void main()
其他代码见附件.http://imzc.net/show-93-1.html
目前仅仅是有个大概功能,暂时未加入模板.
先看看代码吧.获取时间是用windows.h中的GetSystemTime()函数.
不过看到自己实现的运行时间和STL map的时间还真是差别大啊...
还得好好努力...
1. //test.cpp 2. #include "dict.h" 3. #include <Windows.h> 4. #include <map> 5. using namespace std; 6. 7. string ita(int t) 19. void main()
1. //test.cpp
2. #include "dict.h"
3. #include <Windows.h>
4. #include <map>
5. using namespace std;
6.
7. string ita(int t)
19. void main()
其他代码见附件.http://imzc.net/show-93-1.html
相关文章推荐
- STL中map、set的数据结构及底层实现
- STL中map、set的数据结构及底层实现
- STL中map、set的数据结构及底层实现
- STL中的map和hashmap数据结构
- STL中map、set的数据结构及底层实现
- 例说数据结构&STL(九)——map
- STL中map、set的数据结构及底层实现
- 【转载】C++与C#对常用数据结构封装的对比(STL vs System.Collections.Generic)
- STL中的vector、list、deque、map的数据结构
- 【原】C++与C#对常用数据结构封装的对比(STL vs System.Collections.Generic)
- STL中map、set的数据结构及底层实现
- STL中map、set的数据结构及底层实现
- STL中hash_map深度剖析—使用自定义类型
- STL中sort、priority_queue、map、set的自定义比较函数
- C++与C#对常用数据结构封装的对比(STL vs System.Collections.Generic)
- STL中map、set的数据结构及底层实现
- 对比理解一下STL的自定义比较方法
- C++STL:向map中添加元素的方法对比
- C++与C#对常用数据结构封装的对比(STL vs System.Collections.Generic)
- STL中map、set的数据结构及底层实现 (转载)