#include "stdio.h"
#include "string.h"
#include "stdlib.h"
#include "conio.h"
#include "malloc.h"
#define LIST_INIT_SIZE 100
#define LISTINCREMENT 10
typedef struct{
int *elem;
int Length;
int listsize;
}SqList;
void InitList(SqList * LQ){
(*LQ).elem=(int )malloc(LIST_INIT_SIZEsizeof(int));
if(!(*LQ).elem) exit(0);
(*LQ).Length=0;
(*LQ).listsize=LIST_INIT_SIZE;
}
void CreateSqlist(SqList * LQ){
int i;
if((*LQ).Length>(*LQ).listsize);
for(i=1;i<=(*LQ).Length;i++){
scanf("%d",&(*LQ).elem);
*LQ++;
}
}
void main(){
SqList *L;
InitList(L);
printf("shuruxianxingbiaochangdu/n");
scanf("%d",&(*L).Length);
CreateSqlist(L);
printf("%d",(*L).elem);
getch();
}
所有(*LQ).elem这样的格式 要LQ->elem这样写。