简单的C程序错误-》关于对列的,帮改错
#include"stdio.h"
#include"malloc.h"
struct queuenode
{ char item;
struct queuenode*former;
struct queuenode*next;
};
void enterqueue(struct queuenode*tail,*head,char ch)
{
struct queuenode*temp;
temp=(struct queuenode*)malloc(sizeof(struct queuenode));
if(tail->next==NULL)
{
tail->next=temp;
temp->former=tail;
head=temp;
temp->next=NULL;
}
else
{
temp->next=tail->next;
tail->next=temp;
temp->former=tail;
temp->next->former=temp;
}
temp->item=ch;
}
char exitqueue(struct queuenode*tail,*head)
{
struct queuenode*temp;
char ch;
if(tail->==NULL)
return(NULL);
temp=head;
head=temp->former;
head->next=NULL;
ch=temp->item;
free(temp);
return(ch);
}
main()
{
struct queuenode*tail,*head;
char ch;
tail=(struct queuenode*)malloc(sizeof(struct queuenode));
tail->former=NULL;
tail->next=NULL;
head=tail;
for( ; ; )
{
ch=getchar();
if(ch=='#')break;
enterqueue(tail,ch);
putchar(ch);
}
for( ; ; )
{
ch=exitqueue(tail,head);
if(ch==NULL)break;
putchar(ch);
}
getch();
}
win-tc中
错误: 不正确的 配置文件 选项 : ?
TC中错误
1: Unable to open include file 'STDIO.H'
2: Unable to open include file 'MALLOC.H'
8: Declaration syntax error
不明白啊!高手指点一下吧!