Hi everyone,

I've been working on a program that I need to do for Numerical Analyses. I use memory allocation with a 2D array.

I'm not really used to this, but my teacher says that the program should not work because I'm not using the 2D array correctly. He tried to explain to me why it should not work, but it works.

I've learned to use this on a website, but my teacher wants me to explain how my program works. The problem is that I'm passing the 2D array to a function (I pass the memory location to that function) and it receives just like this:

void resolve_sistema(int eq, float matriz[][eq+1])

He says that It should not work like this. For example, when I want to use the 2D array I use it like this: matriz[5][5], but my teacher says it should be done like this: *(*(matriz+5)+5).

Can someone Help?