- Generic Data type support.
- Auto garbage collection while deleting the data from map.
- Better data structure management.
- Clone this project.
git clone https://github.com/namantam1/hashmap
cd hashmap
- Run the example file with make or command line.
make && ./example
# or
gcc hashmap.c example.c -o example.out && ./example.out
- To use this hashmap in another project import this libary as -
#include "hashmap/hashmap.h"
int main() {
int data = 10;
// create a new map
map_ptr q = map_create(sizeof(int), "some_key", &data);
// do you stuff
// ...
// ...
// destroy the map if not in use to free the memory.
map_destroy(&q);
}
If you find any issue please don't hesitate to create an issue.
Any Contribution or suggestion are welcome.
This project is under MIT License.