I tried to run this code:
#define ROW_CNT 8;
#define COLUMN_CNT 24;
#define FIRST_COLUMN 2;
unsigned int volume[ROW_CNT][COLUMN_CNT][ROW_CNT];
but I get the following errors:
expected identifier or '(' before ']' token
Why is that?
Take off the semicolons on your #defines.
The #define directives are handled by the preprocessing stage of compilation, which is all about text substitution. So, whenever the preprocessor performs text substitution, your program becomes
unsigned int volume[8;][24;][2;];
which isn't valid C.
A pre-processor definition, such as ROW_CNT, replaces any instances of the identifier in your code with the value it's defined as being. Therefore once the pre-processor has expanded your macros, your code will look like:
unsigned int volume[8;][24;][2;];
As you can see, the semicolon is included after 8, 24 and 2, since that's how you defined ROW_CNT, COLUMN_COUNT and FIRST_COUNT to be, and that's obviously not valid C syntax.
Remove the semicolons from the end of your #defines and the code will compile.