-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
47 lines (39 loc) · 810 Bytes
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "bin/array.h"
#include "bin/map.h"
#include "bin/prettyPrint.h"
int main()
{
Array array = {
.type = 'a',
.array = (void *[]){
"Hello",
"World",
},
.size = 2,
};
Map arrayMap = {
.type = 'm',
.pairs = (Pair[]){
{.key = "data", .value = &array},
},
.size = 1,
};
Map map = {
.type = 'm',
.pairs = (Pair[]){
{.key = "array", .value = &array},
{.key = "arrayMap", .value = &arrayMap},
},
.size = 2,
};
prettyPrint(&map, 1);
printf("\n");
prettyPrint(&arrayMap, 1);
printf("\n");
prettyPrint(&array, 1);
printf("\n");
return 0;
}