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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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
which isn’t valid C.