Click to See Complete Forum and Search --> : multi dimension array of components


Kaare_Larsen
October 17th, 2004, 12:07 PM
I need a two dimension array of Picturebox
I have been trying to do like this

PictureBox* array[][]=new PictureBox*[10][10];
and like this

PictureBox**array[]=new PictureBox*[10];
for (int i=0;i<10;i++)
array[i]=new PictureBox * [10];

Is they a way to declare multidimension array without using vektor or carray?

lloydy
October 17th, 2004, 05:50 PM
I think the declaration should be like this


PictureBox* array[,]=new PictureBox*[10,10];


Does that help?

lloydy
October 17th, 2004, 05:52 PM
Actually, don't use the word array


PictureBox* MyPictureBoxArray[,] = new PictureBox*[10,10];

Kaare_Larsen
October 18th, 2004, 12:51 PM
Thanks
Do you know if that is a normal c++ notation or it's just .net special way to do it

lloydy
October 21st, 2004, 05:46 PM
This is how you do it with a managed class (which is obviously a .Net concept). In "normal" C++ you don't have managed classes