I’m playing with pixels in an image..
What i have:
int w; // width
int h; // height
unsafe private int **pData; // pixel data
i want to be able to set pData’s height and width… so something like the following:
pData = new int*[w];
for(int x = 0; x<w; x++)
pData = new int*[h];
this causes an error though (“cannot implicitly convert int[] to int**). How would i go about doing this in C#? I know this will work in C and C++…
I guess what i’m looking for is an equivalent to the above in C# … as that is written in C++
So you just want a pixel grid?
In C# you could just use multidimensional arrays or an array of arrays, e.g.