C++:array functions
<p>How can I write a program that reads in, a collection of characters from the key board and outputs them to the console. Data is input at random, but output selectively. Only unique characters are displayed at the console. Therefore, every character should be displayed once, no matter how many  times it appears in the array.</p>

<p>For example, if an array</p>

<pre><code>Char letterArray[ ] = {B,C,C,X,Y,U,U,U};
</code></pre>

<p>The output should be:</p>

<pre><code>B,C,X,Y,U
</code></pre>

<p>This is what I have done so far...    </p>

<pre><code>char myArray [500];
int count = 0;
int entered = 0;
char num;

while (entered &lt; 8)
{
    cout &lt;&lt; "\nEnter a Character:";
    cin &gt;&gt; num;

    bool duplicate = false;
    entered++;

    for (int i = 0; i &lt; 8; i++)
    {
        if (myArray[i] == num)
            duplicate=true;
    }

    if (!duplicate)
    {
        myArray[count] = num;
        count++;
    } // end if
    else
        cout &lt;&lt; num &lt;&lt; " character has already been entered\n\n";

    // prints the list of values
    cout&lt;&lt;"The final Array Contains:\n";

    for (int i = 0; i &lt; count; i++)
    {
        cout &lt;&lt; myArray[i] &lt;&lt; " ";
    }
}
</code></pre>
