我给你几个版本:
1.
#include<stdio.h>
#include<stdlib.h>
#define MAXSIZE 100
typedef struct
{
int elem[MAXSIZE] ;
int len ;
} SQLIST;
void creatsqlist ( SQLIST &L );
int main( void )
{
SQLIST L ;
creatsqlist (L);
printf ( " %d", L.elem[1] );
system ( "pause" );
return 0;
}//函数main结束
void creatsqlist ( SQLIST &L ) //创建线性表
{
int i;
scanf( "%d", &L.len );
for ( i = 0; i < L.len; i++ )
scanf ( "%d", &L.elem[i] );
}
倚天照海花无数,流水高山心自知。