提交 4a3428cb 创建 作者: 宋海霞's avatar 宋海霞

modify

上级 e1254328
......@@ -8,7 +8,7 @@ int main(int argc, char* argv[])
ElemType Elem;
//
// 初始化线性表
// Initialize the linear table
//
List.nLength = 8;
for(i=0; i<List.nLength; i++)
......@@ -18,7 +18,7 @@ int main(int argc, char* argv[])
// 在第 i 个元素之后插入元素
//
InsertAfter(&List, 33, 5);
InsertAfter(&List, 45, 15); // 插入位置非法。插入失败。
InsertAfter(&List, 45, 15); // 插入位置非法.插入失败.
for(i=0; i<List.nLength; i++)
{
......@@ -30,24 +30,24 @@ int main(int argc, char* argv[])
}
/*
功能:
在第 i 个元素之后插入一个元素
function:
在第 i 个元素之后插入一个元素.
参数:
pList -- 线性表
parameter:
pList -- Linear table
Elem -- 插入的元素
i -- 指定位置。从 1 开始计数。
i -- 指定位置.从 1 开始计数.
返回值:
returned value:
如果插入成功返回 1
如果插入失败返回 0
*/
int InsertAfter(SqList* pList, ElemType Elem, int i)
{
int nIndex; // 用于移动元素的游标
int nIndex; // The cursor used to move elements
//
// TODO: 在此添加代码
// TODO: Add the code here
//
return 0;
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论