您的位置:首页 > 理论基础 > 数据结构算法

自定义数据结构与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()


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

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: