急急急!!!找程序错误

来源:百度知道 编辑:UC知道 时间:2024/05/15 19:58:46
称正读和反读都相同的序列叫回文编写一程序判断读入的一个以#号为结束字符的字符序列是否为回文。
/******************************************
程序文件名:回文
程序功能:判断一个字符串是否为回文
******************************************/
#include <iostream.h>
//定义数据类型
#define maxsize1 100
typedef struct{
char data[maxsize1];
int top;
}seqstack;
#define maxsize 1024
typedef struct {
char data[maxsize];
int rear,front;
}c_sequeue;
c_sequue * in_c_sequeue(c_sequue *q,char s[]);
seqstack * push_sequstack(seqstack *s,char x[]);
void main()
{
char ch[30];
cout<<"请输入一组字符,结尾一#结束"<<endl;
cin>>ch;
c_sequue *p;
seqstack *r;
in_c_sequeue(p,ch);
push_sequstack(r,ch);//调用自定义函数,进行入队和入栈
while(r->top!=-1)//逐个比较各元素
{
if(p->data[(p->front)++]!=s->data[(s->top)--])
break;

}
if(s->top==-1)
cou

:58
你的计算机没有安装新的FLASH补定插件!当然看不到了。
你可以上网上下一个安装就好了,
(但现在大家都不想装这些,这样可以提高上网速度的)