Hello

I posted a question on this forum about a similar issue but i still have not resolved it. Basically i'm writing a small app- the visual display consists of 5 circles and a Next button. The circles are grey to begin with, but turn red one at a time as you hit the next button.
I'm assuming that an array and a switch statement is the best thing to use for this, so have written the following:

void __fastcall TForm1::NextButtonClick(TObject *Sender)
{
int StateArray[6]= {1,2,3,4,5,6};

switch(StateArray)
{
case 1 : Shape5->Brush->Color = clRed; break;
case 2 : Shape4->Brush->Color = clRed; break;
case 3 : Shape3->Brush->Color = clRed; break;
case 4 : Shape2->Brush->Color = clRed; break;
case 5 : Shape1->Brush->Color = clRed; break;

}
}

The error i'm getting is that the switch selection expression must be of integral type. First, I want to know if i am on the right track above (more or less). Secondly, i understand now that the case statements need to be converted to int, but i cannot find code on how to do this anywhere. Any help MUCH appreciated.

Divinyl