帮忙看一下这个程序有什么问题,我用dev c++编写,为什么无法编译,显示 InitList does not name a type
#include<stdio.h>#include<stdlib.h>#defineLISTINITSIZE100#defineLISTINCREMENT10typede...
#include <stdio.h>
#include <stdlib.h>
#define LIST INIT SIZE 100
#define LISTINCREMENT 10
typedef struct{
int *elem;
int length;
int listsize;
}aqlist;
void main()
{int InitList Sq(sqlist &L){
L.elem=(int*)malloc(LIST INIT SIZE *sizeof(int));
if(!L.elem) exit(-2);
L.length=0
L.listsize=LIST INIT SIZE;
printf("初始化一个线性表\n\n");
return 1
}// Initlist sq
} 展开
#include <stdlib.h>
#define LIST INIT SIZE 100
#define LISTINCREMENT 10
typedef struct{
int *elem;
int length;
int listsize;
}aqlist;
void main()
{int InitList Sq(sqlist &L){
L.elem=(int*)malloc(LIST INIT SIZE *sizeof(int));
if(!L.elem) exit(-2);
L.length=0
L.listsize=LIST INIT SIZE;
printf("初始化一个线性表\n\n");
return 1
}// Initlist sq
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询