I am looking for standard tried and tested library in C language (Windows platform) which implements data structures like stacks, queues, trees etc.
I would prefer to have a source code along with it. Writing a library on my own is possible; however, I feel it may be better to opt for some industry standard implementation which may be optimised and less buggy.
Compiler is Visual Studio 2005/2008.
Check out cbase . Its LGPL (most of the other libraries are GPL) if license is something that concerns you.
My only comment is that it requires C99 or GCC. It uses variadic macros, which aren't C89 compatible. It should compile fine under VC2005/2008.
cbase is a C library of useful functions that simplify systems software development on System V UNIX. The library includes routines for memory management, string parsing, filesystem traversal, subprocess execution, I/O, as well as implementations of common data structures such as linked lists, hash tables, stacks, and queues. The library also includes a high-level interface to Berkeley sockets, and an implementation of a scheduler which has functionality very similar to that of the cron daemon. Note: cbase was formerly known as CFL.
Have you checked out qLibc? It's an opensource C implementation that provides various types of data strucutre such as hash table, linked list, queue, stack...
As of today, from it's website I see it has following feature set:
In each container implementation, it clearly explains internal data structure at the top of code. So it would be helpful for you to catch the implementation ideas.
The code can be found at https://github.com/wolkykim/qlibc
Hope this helps. (Please do vote if this helps, I need some points. Thanks :)
你可能想看看http://www.liblfds.org/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.