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

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

问题描述

执行标准 C 库实现,尤其是 glibc(GNU 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?

谢谢.

推荐答案

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

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天全站免登陆