The problem is the semicolon on line 138:
for (int column = 0; column < d - 1; column++);
In C, a semicolon is used to terminate a statement. The body of the
for loop (the part in curly braces) is part of the loop statement. If you add a semicolon after the declaration, but before the curly braces, the compiler considers the loop statement to be terminated before the body even starts, producing the
for loop has empty body warning.
Now, the loop variable
column that you declared in line 138 is only in-scope during the body of the loop. Since you accidentally terminated the loop before giving it a body,
column leaves scope immediately after the declaration on line 138. Since you haven't previously declared
column in the scope outside of the loop, you get the
use of undeclared identifier error.
If you delete the semicolon from the end of line 138 it should fix at least two of those errors; since
row is also raising an error, it's likely you have the same problem in an earlier loop declaration. In general, you don't need to use semicolons after
for loop declarations or body blocks in C. You only need them in the declaration itself and on the individual statements inside the body. Like this:
for (int i = 0; i < 5; i++)
Notice there is no semicolon at the end of the loop declaration or after the curly brace that closes the loop body.