项目详情
由
分享
HelloGitHub 评分
0 人评分
为 C 语言提供哈希表的库
过去 7 天共收获 0 颗 Star ✨
使用方向键查看日期,Home 和 End 跳至首尾,Escape 关闭提示。| 日期 | Star | 较前日 |
|---|---|---|
| 周二 | 4,791 | — |
| 周三 | 4,791 | 0 |
| 周四 | 4,791 | 0 |
| 周五 | 4,790 | -1 |
| 周六 | 4,790 | 0 |
| 周日 | 4,791 | +1 |
| 周一 | 4,791 | 0 |
4.8k
星数
否
中文
C
主语言
否
活跃
38
贡献者
32
Issues
否
组织
无
最新版本
976
Forks
无
协议
为 C 语言提供哈希表的库。由于 C 语言中没有类似字典的数据结构,该库提供了哈希表常见的查询、插入、删除、排序等函数。使用方法简单,仅需引入一个头文件
```c
#include "uthash.h"
struct my_struct {
int id; /* we'll use this field as the key */
char name[10];
UT_hash_handle hh; /* makes this structure hashable */
};
struct my_struct *users = NULL;
void add_user(struct my_struct *s) {
HASH_ADD_INT( users, id, s );
}
```
评论
评分:
暂无精选评论