S
Slain
I need to convert a an array to a multidimensional one. Since I need
to wrok with existing code, I need to modify a declaration which looks
like this
In the .h file
int *x;
in a initialize function:
x = new int[$Row_Length];
Now I need the x to be able to point to a multidimensional array
I would ahve been fine, with something like
int (*x)[Column_Length] = new int [Row_Length][Column_Length];
But since my variable x needs to be declated in the header file, I am
having some problems compiling. Can some one explain me how to declare
and initialize?
Thank you
to wrok with existing code, I need to modify a declaration which looks
like this
In the .h file
int *x;
in a initialize function:
x = new int[$Row_Length];
Now I need the x to be able to point to a multidimensional array
I would ahve been fine, with something like
int (*x)[Column_Length] = new int [Row_Length][Column_Length];
But since my variable x needs to be declated in the header file, I am
having some problems compiling. Can some one explain me how to declare
and initialize?
Thank you