summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2025-01-03 20:43:21 +0100
committerBaitinq <manuelpalenzuelamerino@gmail.com>2025-01-03 20:43:21 +0100
commit2b7d5d1445bac6c73e70ea0b49e2ffb3a5ec91f6 (patch)
tree8f70e05e98962c5d4d2961b4beec3a16a4d14e48 /src
parentCleanup (diff)
downloadc-hashtable-2b7d5d1445bac6c73e70ea0b49e2ffb3a5ec91f6.tar.gz
c-hashtable-2b7d5d1445bac6c73e70ea0b49e2ffb3a5ec91f6.tar.bz2
c-hashtable-2b7d5d1445bac6c73e70ea0b49e2ffb3a5ec91f6.zip
better example
Diffstat (limited to 'src')
-rw-r--r--src/main.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index ba8d6b6..aa15631 100644
--- a/src/main.c
+++ b/src/main.c
@@ -33,6 +33,20 @@ int main(int argc, char** argv) {
 	res = hashtable_get(ht, "b");
 
 	printf("Result: %s\n", res);
+	
+	struct test {
+		int value;
+	};
+
+	struct test example = {
+		.value = 7
+	};
+	
+	hashtable_put(ht, "b", (void*)&example);
+
+	struct test* res2 = hashtable_get(ht, "b");
+
+	printf("Result: %d\n", res2->value);
 
 	hashtable_deinit(&ht);