Nov 30th, 2006, 5:09 PM
|
#2
|
|
Professional Programmer
Join Date: May 2006
Location: UK - London
Posts: 333
Rep Power: 3 
|
Quote:
Originally Posted by fhslacrosse13
int mainmyQueue<char> Q;
myStack<char> S;
char ch;
cout<<"Enter lines of text - enter <ctrl-Z> to quit: "<<endl;
cin.get(ch);
while(ch!='\n')
{
while(cin)
{
if(!isspace(ch))
{
Q.push(ch);
S.push(ch);
}
if(palindrome (S,Q))
{
cout<<"Palindrome!"<<endl;
}
else
{
cout<<"Not Palindrome"<<endl;
}
cout<<"Enter lines of text - enter <ctrl-Z> to quit: "<<endl;
cin.get(ch);
}
}
return 0;
}
|
i put the curly braces in...........very badly i know
__________________
Quote:
When I was young it seemed that life was so wonderful,a miracle, oh it was beautiful, magical.
Now watch what you say or they'll be calling you a radical,a liberal, oh fanatical, criminal. Oh won't you sign up your name,we'd like to feel you're acceptable, respectable, oh presentable, a vegetable
|
|
|
|