我测试过,当运行到语句“nodelist->next=NULL”这里就直接退出了。求解。

是因为malloc()函数结点生成未成功吗?这么改试试:
struct Node* CreatNode()
{
struct Node* nodelist = (struct Node*)malloc(sizeof(struct Node));
if (!nodelist) return NULL;
nodelist->next = NULL;
return nodelist;
}