How to cast a void pointer to a multi array pointer in ISO c++?
Posted on 2004-10-15
i have the following problem,
I want to cast a void pointer to a pointer for a 2d-array with bounds. My code that does NOT work look like this:
double (*newArr)[(*border).grid][(*border).grid]=(double *[(*border).grid][(*border).grid]) (*border).Arr1;
where grid is a int, newArr is suppose to become the pointer to the 2d-array, Arr1 is a void pointer that in a structure pointed to by border and Arr1 points to the array that i really want to point to.
What should i write instead? please help!