I want to create labels from strings in the following manner:

for(j = 0; j < 5; j++){
for(i = 0; i < 5; i++){
myLabel->Caption = CHAR(j + 65) + (i + 1);
}
}

This is to give me

A1, A2, A3, A4, A5
B1, B2, B3, B4, B5

etc.

How do I get it to work?

#include <stdio.h>

int main ( void )
{
   char caption [ 3 ];
   int letter, number;
   for ( letter = 0; letter < 5; letter++ )
   {
      for ( number = 0; number < 5; number++ )
      {
         sprintf ( caption, "%c%d", letter + 'A', number + 1 );
         printf ( "%s%c", caption, number == 4 ? '\n' : ' ' );
      }
   }
   return 0;
}

/* my output
A1 A2 A3 A4 A5
B1 B2 B3 B4 B5
C1 C2 C3 C4 C5
D1 D2 D3 D4 D5
E1 E2 E3 E4 E5
*/