【菜鸟求教】单链表递增排序,程序输出出现-842150451
#include "stdafx.h"
#include "malloc.h"
#include "stdio.h"
typedef int ElemType;
typedef struct Lcode
{
ElemType data;
struct Lcode*next;
}LinkList;
void InitList(LinkList*&L)
{
L=(LinkList*)malloc(sizeof(LinkList));
L->next=NULL;
}
void ListInsert(LinkList*&L,ElemType a[],int n