Standard data structure library in C?

后端 未结 5 2053
野的像风
野的像风 2020-11-30 03:23

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 t

相关标签:
5条回答
  • 2020-11-30 03:50

    Glib

    Download Glib for Windows here

    0 讨论(0)
  • 2020-11-30 03:57

    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:

    • Containers
      • List --- Doubly Linked List.
      • List Table --- KEY/VALUE paired table implemented on linked-list.
      • Hash Table --- Hash based KEY/VALUE paired table.
      • Static Hash Table --- Static(array/mmapped/shared) memory based KEY/VALUE paired table.
      • Vector --- implements a growable array of elements.
      • Queue --- FIFO(First In First Out) implementation.
      • Stack --- LIFO(Last In First Out) implementation.
    • General utilities.
      • String
      • I/O
      • File
      • IPC, Semaphore Shared-memory
      • En/decoders
      • Hashes
      • System
      • Time
    • Extensions
      • INI-style Configuration File Parser.
      • Apache-style Configuration File Parser.
      • Rotating File Logger.
      • HTTP client.
      • Database(MySQL) interface.

    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 :)

    0 讨论(0)
  • 2020-11-30 03:58
    • GDSL. As per the documents, it is pure ANSI C and should work with Visual C++.
    • C-generic-library
    • Kompimi. C data structure library, with an emphasis on collections. Comes with Visual Studio project files.
    0 讨论(0)
  • 2020-11-30 04:00

    You might want to have a look at http://www.liblfds.org/

    0 讨论(0)
  • 2020-11-30 04:13

    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.

    0 讨论(0)
提交回复
热议问题