Converting from java to C++
<p>How do I convert the following to C++</p>

<pre><code>public class Palindrome
{
    public static void main(String args[])
    {
        String phrase;
        Palindrome program = new Palindrome();

        /*gets a phrase from the user and reads it*/
        BufferedReader keyboard = new BufferedReader(new InputStreamReader(System.in));

        System.out.print("Enter a phrase =&gt;");
        System.out.flush();

        phrase = keyboard.readLine();

        /*determines if the phrase is a palindrome and prints result*/
        if(!program.isPalindrome(phrase))
            System.out.println("The phrase is NOT a palindrome.");

        else System.out.println("The phrase is a palindrome.");

    }

    public static boolean isPalindrome(String testString)
    {
        Stack s = new Stack();
        Queue q = new Queue();
        String temp = testString.toLowerCase();
        for (int i = 0; i &lt; temp.length(); i++) {
        Character c = new Character(temp.charAt(i));
        if (!Character.isWhitespace(c.charValue())) {
            s.push(c);
            q.enqueue(c);
        }
        }
        while (!s.isEmpty()) {
        Character a = (Character)s.pop();
        Character b = (Character)q.dequeue();
        if (!a.equals(b))
            return false;
        }
        return true;
    }
}
</code></pre>

<hr>

<pre><code>public class Queue
{
        private LinkedList myList;

    public Queue()
    {
        myList = new LinkedList();
    }

    /**
     * This method should return null if the Queue is empty
     */
    public Object deQueue()
    {
        return myList.removeHead();
    }

    public void enQueue(Object addObj)
    {
        myList.addTail(addObj);
    }

    /**
     * This method should return true if the queue has no more 
     * elements in it
     */
    public boolean isEmpty()
    {
        myList.resetIndex();
        return (myList.getIndexedNode() == null);
    }
}
</code></pre>

<hr>

<pre><code>public class Stack
{
        private LinkedList myList;

    public Stack()
    {
        myList = new LinkedList();
    }

    /**
     * This method should return null if the Stack is empty
     */
    public Object pop()
    {
        return myList.removeHead();
    }

    public void push(Object addObj)
    {
        myList.addHead(addObj);
    }

    /**
     * This method should return true if the stack has no more 
     * elements in it
     */
    public boolean isEmpty()
    {
        myList.resetIndex();
        return (myList.getIndexedNode() == null);
    }

}
</code></pre>
