how to programe in c++ using palindrome

Oct 25, 2012 at 3:08pm
can anyone please help me write a programme in c++ using both a stack and a queue of characters,and both stack and queue are linked list implemented.and to check if the word is a palindrome
Oct 25, 2012 at 3:14pm
Do you need to implement your own data structure or can you use the stl?
Oct 25, 2012 at 5:41pm
You can store the word in an array of chars (cstring) and use a for loop to iterate through and compare the array. You would need to write a function to return the length of a string (or you could cheat and use strlen() :( ). If you still can't see it, you could try and write out some examples on paper.
Last edited on Oct 25, 2012 at 5:43pm
Topic archived. No new replies allowed.