This is funny. But as I said don't know anything about this "__gc" thingy.When I add [5] instead of [], I get the error at this line:
Code:
PictureBox* picBlocks[];
error C3616: '5': a size cannot be specified in a __gc array declaration
But I guess that should work
KurtCode:for(int i = 0; i < 5; i++) { PictureBox* picBlock = new PictureBox(); pnlGameField->Controls->Add( picBlock ); // here you can work with the newly created block }