C++ Selection for Array
<p>I'm trying to teach myself C++ through a book I picked up. One of the exercises is to get an user-inputted array of colours as string objects. Then they say to implement a selection sort on the user-inputted colours using relational operators. I have already started on what I think is the right track, but I have hit a road block and I am not sure what is wrong with it. It compiles, it just won't return the sorted vales (I think) Any assistance with what I have already would be greatly appreciated</p>

<pre><code>void selectionSort(char [], int);
int main()
{
    const int SIZE = 80;
    char colour[SIZE];

    cout &lt;&lt; "Enter the names of five kinds of fruit:" &lt;&lt; endl;
    cin.getline(colour, SIZE);

    cout &lt;&lt; colour &lt;&lt; endl;
    selectionSort(colour, SIZE);

    cout &lt;&lt; colour &lt;&lt; endl;
    return 0;
}
// SORT
void selectionSort(char shade[], int size)
{
    int startScan, minIndex, minValue;


    for (startScan = 0; startScan &lt; (size - 1); startScan++)
    {
        minIndex = startScan;
        minValue = shade[startScan];
        for (int index = startScan + 1; index &lt; size; index++)
        {    
            if (shade[index] &lt; minValue)
            {
                minValue = shade[index];
                minIndex = index;
            }
        }
        shade[minIndex] = shade[startScan];
        shade[startScan] = minValue;
    }
    cout &lt;&lt; shade[size] &lt;&lt; endl;
}
</code></pre>
