I'm relatively new to C, and part of a program I have to write requires finding the position of a 'space' character within the array, which I'm having a lot of trouble with. It's a 5x5 array with one space in it, a puzzle.
Here's what I have so far:
#define ROW 5
#define COLUMN 5
void fromAbove(char aboveArray);
int row = 0;
FILE *infile, *outfile, *test;
infile = fopen("./puzzle.in","r");
outfile = fopen("./puzzle.out","w");
test = fopen("./test.out","w");
fprintf(outfile,"Puzzle #1: \n");
while(row <= 5)
for(column = 0; column < 5; column++)
void fromAbove(char aboveArray)
char a = aboveArray[row][column];
if(a == ' ')
Also, I'm getting these errors: "type of formal parameter 1 is incomplete", and "
passing argument 1 of āfromAboveā makes pointer from integer without a cast"
Any help would be appreciated. Thanks
P.S. sorry I'm new here so no idea how to post code properly yet...