Could you recommend a good general purpose data container library for C (pure C, not C++)? I just need basic structures, like dynamic arrays, hash tables, etc.
(Note: By "good" I mean fast + elegant interface).
Libaries consist of a set of related functions to perform a common task; for example, the standard C library, 'libc. a', is automatically linked into your programs by the “gcc” compiler and can be found at /usr/lib/libc. a. Standard system libraries are usually found in /lib and /usr/lib/ directories.
Without the standard library, you're entire reliant on your own code, any non-standard libraries that might be available to you, and any operating system system calls that you might be able to interface to (which might be considered non-standard library calls).
The standard input and output library is stdio. h, and you will find that you include this library in almost every program you write. It allows printing to the screen and collecting input from the user.
The ANSI C standard library consists of 24 C header files which can be included into a programmer's project with a single directive. Each header file contains one or more function declarations, data type definitions and macros. The contents of these header files follows.
Isn't Glib sufficient for your needs ? :-) developer.gnome.org/glib
I think Dave Hanson's C Interfaces and Implementations qualifies as both fast and elegant. It includes many different kinds of containers, some string processing, multiprecision arithmetic, exceptions, a couple of different memory managers. Nice stuff.
There's a book, but you don't need to buy it to use the software.
Apache Portable Runtime
http://apr.apache.org/
Includes modules for these areas.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With