1
0
Fork 0
hash-table/src/main.c

29 lines
647 B
C
Raw Normal View History

2024-04-13 12:16:20 +00:00
#include "base.h"
#include "win32_platform.h"
2024-04-13 12:16:20 +00:00
#include "arena.h"
#include "string.h"
#include "hash_store.h"
2024-04-13 12:16:20 +00:00
#include "win32_platform.c"
2024-04-13 12:16:20 +00:00
#include "arena.c"
#include "string.c"
#include "hash_store.c"
2024-04-13 12:16:20 +00:00
2024-04-12 15:26:08 +00:00
int
main(void)
{
Table *table = hash_store_initialize();
2024-04-13 12:16:20 +00:00
String8 str8_1 = str8_lit("Hello world");
String8 str8_2 = str8_lit("ayenooo");
2024-04-13 12:16:20 +00:00
Key key1 = hash_store_string8_to_key(table, str8_1);
Key key2 = hash_store_string8_to_key(table, str8_2);
Key key3 = hash_store_string8_to_key(table, str8_1);
2024-04-13 12:16:20 +00:00
String8 string = hash_store_string8_from_key(table, key2);
printf("%.*s\n", (i32) string.length, string.content);
2024-04-13 12:16:20 +00:00
2024-04-12 15:26:08 +00:00
return 0;
};