C data structure library

I want to use the stack in C, would anyone recommend a library?

For example, for a hash table, I used UThash.

Thanks!

+6
source share
3 answers

Here is a similar question:

Are there open source C libraries with common data structures?

And here is CCAN, C, equivalent to CPAN:

http://ccan.ozlabs.org/

+4
source

The stack implementation is suitable for a single sheet of paper.

The simplest stack example

int stack[1000]; int *sp; #define push(sp, n) (*((sp)++) = (n)) #define pop(sp) (*--(sp)) ... { sp = stack; /* initialize */ push(sp, 10); x = pop(sp); } 
+8
source

If you can lose some weight and use C ++, Qt is a really great library with a lot of basic data structures.

-nine
source

All Articles