get
This commit is contained in:
3 files changed
+49
-7
No files matched your search
+13
-7
@@ -11,11 +11,17 @@ int main(void)
|
||||
kv_put(table, "hello", "people");
|
||||
kv_put(table, "goodbye", "world");
|
||||
|
||||
for (int i = 0; i < table->capacity; ++i)
|
||||
{
|
||||
if (table->entries[i].key)
|
||||
{
|
||||
printf("[%d] %s: %s\n", i, table->entries[i].key, table->entries[i].val);
|
||||
}
|
||||
}
|
||||
// for (int i = 0; i < table->capacity; ++i)
|
||||
// {
|
||||
// if (table->entries[i].key)
|
||||
// {
|
||||
// printf("[%d] %s: %s\n", i, table->entries[i].key, table->entries[i].val);
|
||||
// }
|
||||
// }
|
||||
|
||||
char *val = kv_get(table, "hello");
|
||||
char *val2 = kv_get(table, "goodbye");
|
||||
char *val3 = kv_get(table, "fake");
|
||||
|
||||
printf("%s %s %s\n", val, val2, val3);
|
||||
}
|
||||
Reference in new issue
Block a user