I've declared a matrix dynamically as follows
double **y;
y = (double **)malloc(n*sizeof(double *));
for(i=0;i<n;i++)
y[i]=(double*)malloc(m*sizeof(double));
Where m and n are integers declared before. Then, I need to compute a function that multiplies two different matrix, and I need to check if the number of rows on the first matrix coincides with the number of columns on the second matrix. So I need to know the numbers of columns and rows. So I computed what follows:
int k=sizeof(M[0])/sizeof(double);
But this integer k returns me 1. And no matther how long n and m are...
What am I doing wrong?
Thanks and sorry for my english.