Okay I figured I would try some Windows programming so I wanted to write a simple program that makes an array with 3 elements in it. It uses a for loop to populate the array with the values 0, 1, and 2. Then what I wanted to do was to click the button and you could see the numbers 0, 1, and 2 separated by a space.
But it's not working as intended. It compiles fine. But when I run it and press the button nothing happens. There are no numbers that are seen in the Edit box. Beats me what is wrong. It's hard to be a beginner to GUI programming.
Here is my code:
void __fastcall TForm1::Button1Click(TObject *Sender)
{
int numbers[3];
int t;
for(t = 0; t < 3; t++)
numbers[t] = t;
for(t = 0; t < 3; t++)
Edit1 -> Text = numbers[t] + " ";
}