a want a some1 who can help me in doing a program of stack with template that will chech a word displays in stack is a palindrome or not compared with the 1 was inserted on stack and use c++,thanx
Sure we can help you; the STL already contains stack templates so all you have
to do instantiate them for your type of data you want to push on to that stack.
(a char mayhap?).
If you want to use just 'pure' stacks only you need three of them:
1) push all the characters of the word on two stacks A and B;
2) clear stack B while pushing everything that came out of it on stack C;
3) keep on popping chars from stacks A and C until they're either empty or
until the popped off characters aren't equal.
Now it's your turn.
kind regards,
Jos