comparison playground/main.c @ 71:75de5903355c

Giagantic changes that update Dowa library to be more align with stb style array and hashmap. Updated Seobeo to be caching on server side instead of file level caching. Deleted bunch of things I don't really use.
author June Park <parkjune1995@gmail.com>
date Sun, 28 Dec 2025 20:34:22 -0800
parents 342726584be2
children f07abbcd2ec5
comparison
equal deleted inserted replaced
70:4bc56e88e1f3 71:75de5903355c
1 #include <stdio.h> 1 #include <stdio.h>
2 #include <stdlib.h>
2 3
3 struct Node { 4 typedef struct {
4 char *value; 5 float foo;
5 struct Node *left; 6 float bar;
6 struct Node *right; 7 } Values;
7 };
8 8
9 void *recurr(struct Node *root, int depth) 9 int capacity = 20;
10 {
11 if (depth)
12 return;
13 root.left =
14 }
15 10
16 int main() 11 int main()
17 { 12 {
18 struct Node root = {} 13 int a;
19 struct Node **queue = {} 14 void *p = malloc(sizeof(Values) + (sizeof(int) * 20));
15 int *b = (int *)(p + sizeof(Values));
16 Values *c = (Values *)p;
17 c->foo = 10.0f;
18 c->bar = 12.0f;
19 for (int i = 0; i < 20; i++)
20 b[i] = i;
21
22 for (int i = 0; i < 20; i++)
23 printf("values is %i\n", b[i]);
24
25 printf("c->foo: %f\n", c->foo);
26 printf("c->bar: %f\n", c->bar);
27
28 Values *d = (Values *)b - 1;
29 printf("d->foo: %f\n", d->foo);
30 printf("d->bar: %f\n", d->bar);
31
32 return 0;
20 } 33 }