//建表
MaxtriHeadNode*CreateTable(){int row =0;int col =0;
MaxtriHeadNode* h =(MaxtriHeadNode*)malloc(sizeof(MaxtriHeadNode));
h->next =NULL;
RowHeadNode* r = h ->next;printf("Please input the row num: ");scanf("%d",&h->row);printf("Please input the col num: ");scanf("%d",&h->col);for(row =0; row < h->row; row++){
RowHeadNode* s =(RowHeadNode*)malloc(sizeof(RowHeadNode));printf("Please input the %d row,%d data : \n", row +1,h->col);for(col =0; col < h->col; col++){scanf("%d",&s->a[col]);}if(!h->next) h->next = s;else r ->next= s;
r = s;}
r->next =NULL;return h;}//显示voidDispTable(MaxtriHeadNode* h){
RowHeadNode* p = h->next;printf("**********************************\n");while(p){for(int i =0; i < h->col; i++)printf("\t%d", p->a[i]);printf("\n");
p = p->next;}printf("**********************************\n");}// 摧毁voidDestroyTable(MaxtriHeadNode* h){
RowHeadNode* pre = h->next;
RowHeadNode* p = h->next->next;while(p){free(pre);
pre = p;
p = p->next;}free(pre);free(h);}