This commit is contained in:
Imbus 2025-06-15 21:20:40 +02:00
parent 77a8a6bb74
commit 5274372180
4 changed files with 160 additions and 0 deletions

23
hashmap/main.c Normal file
View file

@ -0,0 +1,23 @@
#include "hashmap.h"
#include <stdio.h>
int main() {
hashmap_t *map = hashmap_create(128);
int value1 = 42;
hashmap_put(map, "answer", &value1);
int *found = hashmap_get(map, "answer");
if (found) {
printf("Found: %d\n", *found);
}
hashmap_remove(map, "answer");
found = hashmap_get(map, "answer");
if (!found) {
printf("Entry removed.\n");
}
hashmap_destroy(map);
return 0;
}