有针对C的标准Queue实现吗? [英] Are there standard Queue implementations for C?

查看:53
本文介绍了有针对C的标准Queue实现吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有C附带的任何队列数据结构实现,或者我必须开发自己的队列数据结构(这是针对学校项目的,因此,我必须使用标准gcc安装中存在的或必须实现的某种东西)独自一人!)

Is there any Queue data structure implementation that "comes" with C or will I have to develop my own (this is for a school project, thus I must use something that either exists in the standard gcc installation or have to implement one by myself!)

链表,堆栈等其他常规数据结构又如何呢?

What about other general data structures like Linked Lists, Stacks, etc?

推荐答案

您必须实现自己的.C在数据结构方面几乎没有什么优势,它迫使您诉诸可疑的技巧来实现抽象数据类型:如果可以找到,请参见标题为不完整的类型作为抽象"的文章,或者看看原理如何应用,例如, PolarSSL的bignum.h文件.另一方面,C ++应该允许您执行C中几乎可以做的所有事情,并为您提供实现抽象数据结构的方法.

You must implement your own. C has very little in terms of data structures and forces you to resort to arguable tricks to implement abstract data types: see an article titled "Incomplete types as abstractions" if you can find it, or see how the principles are applied in, say, PolarSSL's bignum.h file. C++ on the other hand is supposed to allow you to do pretty much everything you can do in C and give you ways to implement abstract data structures.

这篇关于有针对C的标准Queue实现吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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