Commit | Line | Data |
---|---|---|
3c5195fd | 1 | # cgds: C Generic Data Structures library |
e97c15c1 | 2 | |
3c5195fd | 3 | Various data structures, from stack to tree, which can contain any data type. |
e97c15c1 | 4 | |
aef8a996 BA |
5 | ## Installation |
6 | ||
e45132ac BA |
7 | make [src] |
8 | make install | |
aef8a996 BA |
9 | 'src' is Makefile default target. |
10 | ||
e97c15c1 BA |
11 | ## Example |
12 | ||
e45132ac BA |
13 | Vector* v = vector_new(int); |
14 | vector_push(v, 32); | |
15 | vector_push(v, 42); | |
16 | int a; vector_get(v, 1, a); //a now contains 42 | |
17 | vector_set(v, 0, 0); //v[0] now contains 0 | |
18 | vector_destroy(v); | |
e97c15c1 | 19 | |
3c5195fd | 20 | More examples in the unit tests under test/ folder. |