数据结构稀疏矩阵实验课程设计 /********function definition********/ int init_matrix(crosslist &one) {//initialization one.row_size=0; one.colum_size=0; one.non_zero_amount=0; one.rhead=NULL; one.chead=NULL; return OK; }//init_matrix int creat_matrix(crosslist &one) {// assignment int i;//as count in the loop element news,temp; /*input row size ,colum size and non zero amount*/ printf("Input the row size of the matrix:"); scanf("%d",&one.row_size); printf("Input the colum size of the matrix:"); scanf("%d",&one.colum_size); printf("Input the non zero amount of the matrix:"); scanf("%d",&one.non_zero_amount); /*allocate memory and the first memory not use*/ one.rhead=(element*)malloc(sizeof(element)*(one.row_size+1)); assert(one.rhead!=NULL);//assert have space one.chead=(element*)malloc(sizeof(element)*(one.colum_size+1)); assert(one.chead!=NULL); /*set all the pointer to NULL*/ for(i=1;ione.row_size); do {//insure the colum script is valid printf("Input the script of the colum:"); scanf("%d",&news->colum);