i have two func from one i am passing address of a matrix and in another function getting elemts in matrix. getting coredump on entering first value
fn1()
{
int aiMat[MAX_ROW][MAX_COL];
int iNoOfRows,iNoOfCol;
/* calls the function to get matrix from user*/
fnGetMatrix(aiMat,&iNoOfRows,&iNoOfCol);
............
..............
}
void fnGetMatrix(int **aiMat,int *iNoOfRows,int *iNoOfCol)
{
.......
.........
for(int iRowCount = 0; iRowCount < *iNoOfRows; iRowCount++)
{
for(int iColCount = 0; iColCount < *iNoOfCol; iColCount++)
{
scanf("%d",&aiMat[iRowCount][iColCount]);
printf("\n");
getchar();
}
}
}
getting core dump in scanning value.