i've looked through quite a few questions of 2-d malloc'd arrays already but bascially for whatever reason i cannot find a solution.... my google fu sux sorry =(. been using the site all day for syntactual help though thanks to everyone who helps here! =)
anyways i cant seem to get this fscanf to work =/ if someone could help me it would be much appreciated because i cant see any error at all but i know there is one because it is at this point that my program crashes.
array1 = (int**)malloc((c)*sizeof(int*));
int a = 0, i = 0;
for (a = 0; a < c; a++){
array1[a] = (int*)malloc((c+1)*sizeof(int));
}
a=0;
for(a = 0; a < c; a++){
for(i = 0; i < c; i++){
fscanf(ifp, "%d", array1[a][i]);
}
}
where c is the maximum size of the array needed. in this case it is set to 3 but i do need it as a variable