I have a problem with accessing two-dimension array in the subprogram which was allocated dynamically in the main program.
The declaration is:
const short mdeme;
double (*nv)[mdeme] = new double[nval][mdeme];
When I'm tring to initialize an array in subprogram I'm getting an error: Access violation.
With the debugger I see that firt step into the subprogram is changing the address of the pointer to the array to 0's.
I tried different ways and still can't understand what I'm doing wrong?
The declaration is:
const short mdeme;
double (*nv)[mdeme] = new double[nval][mdeme];
When I'm tring to initialize an array in subprogram I'm getting an error: Access violation.
With the debugger I see that firt step into the subprogram is changing the address of the pointer to the array to 0's.
I tried different ways and still can't understand what I'm doing wrong?