Dynamic alocation an array of Images in C++ Builder
问题 I want to make a game of BlackJack. I want to make a vector of images and when I press a button a new image shows up(need 2 or 3 images). After that I want to delete all of them in another button press. I try to declare an vector in main class(Unit1.h): class TForm1 : public TForm{ ... public: TImage* Images[]; And in Form1(Unit1.cpp): void __fastcall TForm1::Button1Click(TObject *Sender) { // i=1 is global Images[i] =new TImage(this); Images[i]->Parent=this; Images[i]->Picture->Bitmap->.../