what i want is.....
in a function i have a paramater that takes a 2D array... than i want to manipulate that array and return it..!
the problems is it doesn't seems to return..
here is my codes....
#include <stdio.h>
/** Function protype **/
char fillArray(char map[][], char);
int main(){
char map[2][2];
map = fillArray(map, 'x');
printf("%s\n", map);
return 0;
}
/* fills the array with symbol */
char fillArray( char map[][], char symbol){
int i,j;
for(j=0; j<1; j++){
for(i=0; i<1; i++){
map[j][i]=symbol;
}
}
return map;
}
here is my errors...
PrintArray.c: In function `main':
PrintArray.c:10: incompatible types in assignment
PrintArray.c: In function `fillArray':
PrintArray.c:20: arithmetic on pointer to an incomplete type
PrintArray.c:23: warning: return makes integer from pointer without a cast
i'm really new to C... so you guys have any ideas?