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

modify

上级 3c273356
...@@ -15,10 +15,10 @@ int main(int argc, char* argv[]) ...@@ -15,10 +15,10 @@ int main(int argc, char* argv[])
List.Elements[i] = i; List.Elements[i] = i;
// //
// 删除第 i 个元素 // Delete the ith element
// //
Delete(&List, 6, &Elem); Delete(&List, 6, &Elem);
Delete(&List, 15, &Elem); // 删除位置非法.删除失败. Delete(&List, 15, &Elem); // Illegal deletion of location. Deletion failed.
for(i=0; i<List.nLength; i++) for(i=0; i<List.nLength; i++)
{ {
...@@ -31,16 +31,16 @@ int main(int argc, char* argv[]) ...@@ -31,16 +31,16 @@ int main(int argc, char* argv[])
/* /*
function: function:
删除第 i 个元素. Delete the ith element.
parameter: parameter:
pList -- Linear table pList -- Linear table
i -- 删除元素的位置.从 1 开始计数. i -- Deletes the location of an element.Count from 1.
pElem -- 返回被删除元素的值. pElem -- Returns the value of the deleted element.
returned value: returned value:
如果删除成功返回 1 Returns 1 if deletion succeeds
如果删除失败返回 0 Returns 1 if deletion fails
*/ */
int Delete(SqList* pList, int i, ElemType* pElem) int Delete(SqList* pList, int i, ElemType* pElem)
{ {
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论