Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

3 Commits

Repository files navigation

Hash Table in C

It's just a Hash Table in C but with a nice Generic API.

Quick Start

#include<stdio.h>#defineHT_IMPLEMENTATION#include"ht.h"intmain(void)
{
Ht(constchar*, int) ht= {
.hasheq=ht_cstr_hasheq,
};
*ht_put(&ht, "foo") =69;
*ht_put(&ht, "bar") =420;
*ht_put(&ht, "baz") =1337;
ht_foreach(value, &ht) {
printf("%s => %d\n", ht_key(&ht, value), *value);
}
ht_free(&ht);
return0;
}

About

Hash Table in C but with a nice Generic API

Resources

Stars

357 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages