提交 86381f37 创建 作者: 宋海霞's avatar 宋海霞

modify

上级 62d270c6
...@@ -3,40 +3,40 @@ ...@@ -3,40 +3,40 @@
// //
// 在此处包含 C 标准库头文件 // Include the C standard library header file here
// //
#include <stdio.h> #include <stdio.h>
// //
// 在此处包含其他头文件 // Other header files are included here
// //
// //
// 在此处定义数据结构 // Define the data structure here
// //
// 线性表中的元素 // Elements in a linear table
typedef int KeyType; typedef int KeyType;
typedef struct ElemType { typedef struct ElemType {
KeyType key; // 主关键字 KeyType key; // Primary key
// 省略其他数据,不再定义 // Omit other data and no longer define
}ElemType; }ElemType;
// 线性表的顺序存储结构 // The sequential storage structure of a linear table
typedef struct SeqTable { typedef struct SeqTable {
ElemType* elem; // 数据元素存储空间基址,建表时按实际长度分配, ElemType* elem; // Data element storage space base address, allocated according to the actual length when the table is built,
// 0 号单元留空,从 1 号单元开始使用。 // Unit 0 is left blank and is used from unit 1.
int length; // 表长度 int length; // The length of the table
}SeqTable; }SeqTable;
// //
// 在此处声明函数 // Declare the function here
// //
int BinarySearch(SeqTable* pST, KeyType key); int BinarySearch(SeqTable* pST, KeyType key);
...@@ -45,7 +45,7 @@ void DeleteSeqTable(SeqTable* pST); ...@@ -45,7 +45,7 @@ void DeleteSeqTable(SeqTable* pST);
// //
// 在此处声明全局变量 // Declare global variables here
// //
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论