C模拟为STL [英] C Analog To STL

查看:146
本文介绍了C模拟为STL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

就因为我很好奇 - 是否有任何C模拟C ++中的STL的功能?我见过提及所谓的油嘴滑舌GTK + 库,少数人认为充满了帐单,但是否有其他库,将在提供STL功能C 3

Just because I'm curious--is there any C analog to the functionality of the STL in C++? I've seen mention of a GTK+ library called glib that a few people consider fills the bill but are there other libraries that would provide STL functionality in C?

推荐答案

巧舌如簧为pretty不错的选择:它包括了很多的工具,用于操纵容器,如链表,数组,哈希表等,而且还有被称为面向对象的框架图形对象,您可以使用,使用C与信号和槽对象(尽管有相当冗长的函数调用的名称,如 gobject_set_property ,因为C没有为对象的任何语法)。并设有code主回路,所以你可以编写事件驱动程序。

Yes, glib is a pretty good choice: it includes a lot of utilities for manipulating containers like linked lists, arrays, hash tables, etc. And there is also an object-oriented framework called GObject that you can use to make objects with signals and slots in C (albeit with rather verbose function call names like gobject_set_property, since C doesn't have any syntax for objects). And there is also code for main loops so you can write event-driven programs.

从维基百科更多信息: http://en.wikipedia.org/wiki/Glib

More info from wikipedia: http://en.wikipedia.org/wiki/Glib

油嘴原是GTK的一部分,但非GUI code已经完全提取出来,这样就可以在命令行程序使用它:<一href=\"http://library.gnome.org/devel/glib/stable/\">http://library.gnome.org/devel/glib/stable/

Glib was originally part of GTK, but the non-GUI code has been completely factored out so that you can use it in command-line programs: http://library.gnome.org/devel/glib/stable/

这篇关于C模拟为STL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆