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

modify

上级 4a3428cb
......@@ -15,10 +15,10 @@ int main(int argc, char* argv[])
List.Elements[i] = i;
//
// 在第 i 个元素之后插入元素
// Insert the element after the ith element
//
InsertAfter(&List, 33, 5);
InsertAfter(&List, 45, 15); // 插入位置非法.插入失败.
InsertAfter(&List, 45, 15); // Invalid insert position. Insert failed.
for(i=0; i<List.nLength; i++)
{
......@@ -31,16 +31,16 @@ int main(int argc, char* argv[])
/*
function:
在第 i 个元素之后插入一个元素.
Insert an element after the ith element.
parameter:
pList -- Linear table
Elem -- 插入的元素
i -- 指定位置.从 1 开始计数.
Elem -- Inserted element
i -- The specified location.Count from 1.
returned value:
如果插入成功返回 1
如果插入失败返回 0
Returns 1 if insert succeeds
Returns 0 if insert fails
*/
int InsertAfter(SqList* pList, ElemType Elem, int i)
{
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论