I am trying to optimize a life game. I need to change this code from the header file:
#define MASK(col) (0x80 >> ((col) & 7))
(The variable "col" is a variable that will save the column, it goes from 0 to 8)
To something like this:
int array[9] = { 0, 64, 32, 16, 8, 4, 2, 1};
#define MASK(col) (array[col])
(((0) & 7) = 0, ((1) & 7) = 64, ((2) & 7) = 32, ((3) & 16)...)
The error I am getting with this code is the following:
"#10010 errors encountered during linking "life.out" not built"
"#10056 "array" redefined: first defined in './lifelib.obj', redefined in
'./life.obj'"
(Ps.: I've changed the name of the array to something like: "OKDPSAdiahodakDSA" and I still got the same error)
PS: This error only happens when I make this change. The entire code is working fine.