Possible Duplicate:
Write a function that returns the longest palindrome in a given string
I have a C++ assignment which wants me write a program that finds the longest palindrome in a given text. For example, the text is this: asdqerderdiedasqwertunut
, my program should find tunut
in the index of 19. However if input is changed into this astunutsaderdiedasqwertunut
it should find astunutsa
in the index of 0 instead of tunut
in index of 22.
So, my problem is this. But I am a beginner at the subject, i know just string class, loops, ifs. It would be great if you could help me on this.
Thanks in advance.