Hi,

I'm using Borland C++ Builder 6.0 and I have a form with 32 images (sqr01, sqr02, sqr03 etc). I also have an array with 32 numbers in it. I need to loop through this array, check the value, and then load an image into the appropriate square based on that value.

In VB I can do this using control arrays...
VB Code:
  1. Dim i As Integer
  2. For i = 0 To 31
  3.     If posarr(i) = 1 Then
  4.         'Load a black piece
  5.         sqr(i).Picture = LoadPicture("C:\blackpiece.bmp")
  6.     Else
  7.         'Load a white piece
  8.         sqr(i).Picture = LoadPicture("C:\whitepiece.bmp")
  9.     End If
  10. next i
I'm a newbie, how can I do this in C++?

Thanx for any help.