Originally Posted by
kmdv
Code:
if(puzzle[row][column] == ' ')
{
fromAbove(puzzle[column],row);
}
Decide whether the first dimension is row or column. Assuming columns are the first dimension, you cannot generate a pointer pointing to a row. You should pass pointer to all the elements.
the call for the function is standard when in the function you deal with the first dimension. if you look at the OP, when i write the code for the function, it reads as
Code:
void fromAbove(char array[],row)
in that sense, i've already decided row as first dimension and column as second.
in regards to pointers, another method i tried was
Code:
void fromAbove(char array[5][5]) //don't remember if i defined any variables after that
//back in the main function, the call looks like:
fromAbove(**puzzle);
however, that assumes i want to change both dimensions, which i do not.