标准c库提供链表等数据结构? [英] Does standard c library provides linked list etc. data structures?

查看:155
本文介绍了标准c库提供链表等数据结构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

标准C库实现,特别是 glibc (GNU C库)提供链表,stack等。数据结构,还是要自己滚动?



谢谢。

解决方案>

C标准不提供链表和堆栈等数据结构。一些编译器实现可能会提供自己的版本,但它们的使用在不同的编译器之间是不可移植的。



所以是的,你必须自己写。


Do standard C library implementations, especially glibc (the GNU C Library) provide linked lists, stack et al. data structures, or do we have to roll our own?

Thanks.

解决方案

The C Standard does not provide data structures like linked list and stack.Some compiler implementations might provide their own versions but their usage will be non portable across different compilers.

So Yes, You have to write your own.

这篇关于标准c库提供链表等数据结构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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