枫浆蓝莓鹿 2021-10-02 02:50 采纳率: 50%
浏览 2606

C语言小白在线求助,,为什么ElemType 那一行错误显示'Elemtype'does not name a type,要怎么修改呢

#define InitSize 100
#define LISTINCREMENT 10
typedef struct
{ int data[InitSize];
ElemType elem*;
int listsize;
int length;
} Sqlist;

bool Delete_Same_Sq(Sqlist &L){
if(L.length==0)
return false;
int i,j;
for(i=0,j=1;j<L.length;j++)
if(L.data[i]!=L.data[j])
L.data[++i]=L.data[j];
L.length=i+1;
return true;
}

  • 写回答

2条回答 默认 最新

  • m0_57001426 2022-05-19 20:13
    关注

    在typedef struct 前加
    typedef int ElemType;

    评论

报告相同问题?

问题事件

  • 修改了问题 10月2日
  • 创建了问题 10月2日