作业帮 > 综合 > 作业

illegal use of this type as an expression

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/21 14:59:56
illegal use of this type as an expression
init_LinkList(&head);
head=LinkList *CreateList(ElemType *a,int n);说这个不合法,为什么呢?
see declaration of 'LinkList'
typedef struct linkList
{
ElemType data;
struct linkList *next;
}LinkList;
CreateList这个函数定义了没有?如果声明并定义了,就直接用
head = CreateList(ElemType *a,int n);
不要加 LinkList*,那是定义和声明的时候才加的.
再问: 改了后还有几个错误 missing ')' before 'type' too few actual parameters '=' : incompatible types syntax error : ')'
再答: 啊,忘了,应该是 head = CreateList(a,n);
再问: 还是说不兼容的类型