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

modify

上级 b23128f3
......@@ -15,10 +15,10 @@ int main(int argc, char* argv[])
List.Elements[i] = i;
//
// 在第 i 个元素之前插入元素
// Insert the element before the ith element
//
InsertBefore(&List, 18, 4);
InsertBefore(&List, 20, 11); // 插入位置非法.插入失败.
InsertBefore(&List, 20, 11); // Invalid insert position. Insert failed.
for(i=0; i<List.nLength; i++)
{
......@@ -32,16 +32,16 @@ int main(int argc, char* argv[])
/*
function:
在第 i 个元素之前插入一个元素.
Insert an element before 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 InsertBefore(SqList* pList, ElemType Elem, int i)
{
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论