-
MaCRo problem
What am i doing wrong here? the commented out code causes the following errors.
error C2143: syntax error : missing ')' before ';'
error C2143: syntax error : missing ']' before ')'
error C2143: syntax error : missing ';' before ')'
error C2059: syntax error : ')'
error C2059: syntax error : ']'
error C2143: syntax error : missing ')' before ';'
error C2059: syntax error : ']'
Code:
#include<iostream>
#define SIZE 2;
using namespace std;
int ray[2][2];
//int ray[SIZE][SIZE];
int main() {
}
Thanx
-
You are putting a semi colon in your #define.
Since you are using C++, consider using a const.
-
This macro replaces each occurrence of the token SIZE with 2;, resulting in