Hey there. Im having an issue with a array bounds overflow that makes no sense to me:
Code:
#define MAP_W 16
#define MAP_H 16
typedef char map_data[MAP_H][MAP_W];
map_data level_map = {
/* 0123456789ABCDEF*/
" 000050010000000", //0
"0000000010000000", //1
"0000000010000000", //2
"1110000010000111", //3
"0000000010000000", //4
"0000000010000000", //5
"1111111010000000", //6
"0000000110000000", //7
"0000000010000000", //8
"0000000000000000", //9
"0000000000000000", //A
"0000000000000000", //B
"0000000000000000", //C
"0000000000000000", //D
"0000000000000000", //E
"0000000000000000" //F
};
Okay so…I made an array, 16x16, fill it up and then when i try to compile (VC++) this comes up:
c:\tutorial\copy of copy of plat_engine\plat_engine\plat_engine\main.cpp(5) : error C2117: ‘level_map’ : array bounds overflow
c:\tutorial\copy of copy of plat_engine\plat_engine\plat_engine\main.cpp(3) : see declaration of 'level_map’
c:\tutorial\copy of copy of plat_engine\plat_engine\plat_engine\main.cpp(5) : error C2078: too many initializers
More, it gives the error for each line (same error). So, what am i doing wrong? this makes no sense to me >_<