数据结构的小问题 求大神帮忙
void union(List &La,List Lb) //两个线性表的合并{
La_len = ListLength(La); //get the length of linear A
Lb_len = ListLength(Lb); //get the length of linear B
for(i=1;i<=Lb_len;i++) //这里有点和python类似,for语句后面只接了一个语句但是有层次,说明是从属关系
GetElem(Lb,i,e); //取得b 中的第i个元素。
if(!LocateElem(La,e,euqal))
ListInsert(La;++La_Len,e); //要是a中的元素没有和e的值相同的,就插入,并且表长加一。注意这里的
//ListInster不像原来定义好的那样 。ListInster(&L,i,e)这是在第i个元素之前插入e 是在表尾放入。
}//union
expected identifier before '(' token
expected ')' before '&' token
怎么改 求大神帮忙 union是关键字,换一个名字
页:
[1]