终于正确了 原来是输入的问题
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define null 0
#define maxsize 20
typedef struct node
{
char strdate;
struct node *next;
}llist;//定义链式存储字符串
typedef struct nodestack
{
char stackdate[maxsize];
int top;
}stack;//定义顺序栈
llist *creat(int n)//创建链式存储结构
{
int j;
llist *head,*p,*q;
p=(llist*)malloc(sizeof(llist));
p->strdate=0;
p->next=null;
head=p;//head链表的头结点数据是0
printf("请输入%d个字符:",n);
for(j=1;j<=n;j++)
{
//getchar();//除去每次输入的回车符号
q=(llist*)malloc(sizeof(llist));
//q->strdate=getchar();
scanf("%c",&q->strdate);
q->next=null;
p->next=q;
p=p->next;
}
return(head)