C数据结构库
我想在C中使用堆栈,有人推荐一个库吗?
例如,对于哈希表,我使用了UThash。
谢谢!
堆栈实现适合单张纸。
这是最简单的堆栈示例
int stack[1000]; int *sp; #define push(sp, n) (*((sp)++) = (n)) #define pop(sp) (*--(sp)) ... { sp = stack; /* initialize */ push(sp, 10); x = pop(sp); }
如果你可以稍微捏一点并使用C ++,那么Qt是一个非常棒的库,它有很多基本的数据结构。