c++ - C 语言中是否有像 STL( vector 、 map ...)这样的库?

标签 c++ c stl

<分区>

Possible Duplicates:
Container Class / Library for C
Is there a good collection library for C-language?

在 C++ 中,您有一个非常有用的标准模板库 (STL),它具有 vector 、映射、集合等结构......

如果我使用纯 C,是否有任何库提供类似的结构/函数?

谢谢!

最佳答案

glib 是一个优秀的库,具有许多数据结构和有用的函数。它在 GTK+ 小部件工具包中大量使用。

GLib provides advanced data structures, such as memory chunks, doubly- and singly-linked lists, hash tables, dynamic strings and string utilities, such as a lexical scanner, string chunks (groups of strings), dynamic arrays, balanced binary trees, N-ary trees, quarks (a two-way association of a string and a unique integer identifier), keyed data lists, relations and tuples. Caches provide memory management.

GLib implements functions that provide threads, thread programming and related facilities such as primitive variable access, mutexes, asynchronous queues, secure memory pools, message passing and logging, hook functions (callback registering) and timers. Also message passing facilities such as byte order conversion and I/O channels.

Some other features of GLib include:

  • standard macros
  • warnings and assertions
  • dynamic loading of modules
  • a type system, GType
  • an object system, GObject

http://library.gnome.org/devel/glib/

关于c++ - C 语言中是否有像 STL( vector 、 map ...)这样的库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4310205/

相关文章:

c++ - 比较成员函数的 std::function

c - 如何分隔 GZIP 文件中的 block ?

c++ - 为什么 "gdb"会打印特定类的类方法?

c++ - 如何更好地使用 STL 和仿函数来获得滑动窗口最小值的解决方案

python - Python 的随机森林距离无法构建 (g++)

c++ - 了解 shared_ptr 别名构造函数的原型(prototype)

c++ - 如何在 C++ 中使用 STL 将带空格的字符串连接成一个字符串

c - 段错误检查 strcmp

c++ - 全局变量的顺序会改变 C++/OpenGL 中的性能

c++ - C++中的动态堆栈数据类型声明