I need to have the program take a user's input in prefix notation and display it in a left child-right child array representation of a tree.

Ex: input: *2x

output:

* 1 2

2 0 0

x 0 0

the first column representing the elements, the second column refers to the left child while the third column refers to the right child.

The problem I am having is getting the input to read the input as 3 different characters so they can be displayed in array[0][0], array[1][0], and array[2][0]. I must only use one 2 dimensional array.

If a link to the problem would be helpful its

CSCI 3080 Fall 2009 OLA 2