# data-struct **Repository Path**: tyustli/data-struct ## Basic Information - **Project Name**: data-struct - **Description**: 数据结构 严蔚敏、高一凡 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-01-25 - **Last Updated**: 2022-05-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # data-struct ## 介绍 《数据结构与算法》 严蔚敏、高一凡 教材配套程序 ## 软件架构 - inc 公共头文件 - triplet 三元组 - triplet.c 数据结构的基本操作的实现 - triplet.h 数据结构基本操作的申明 - sample.c 使用示例 - Makefile 工程构建文件 - list 链表 - sequence 顺序表 - ... 其它数据结构类型 ## 使用说明 编译 ```c cd triplet make ``` 运行 ```c ./triplet ``` ## 注意事项 《数据结构》 课本中函数参数引用时,采用的是 `&`,而本仓库用 C 实现的引用参数使用的是 `*`。 C++ 中使用 `&` 可以表示变量类型引用变量(简单说来为引用),这种 `&` 的用法在 C 中不存在。但是在 C 语言中用 `指针` 也可以实现类似的功能。 C++ 引用示例 ```c /* cpp */ #include void f(int &r) { r = 2 * r; } int main(void) { int i = 3; f(i); printf("%d\r\n", i); return 0; } /* * 编译:gcc -o test test.cpp * 运行:./test * 输出:6 */ ``` C 指针示例 ```c /* C */ #include void f(int *r) { *r = 2 * (*r); } int main(void) { int i = 3; f(&i); printf("%d\r\n", i); return 0; } /* * 编译:gcc -o test test.c * 运行:./test * 输出:6 */ ```