I have two arrays:
short GMobiles[18] = {0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F, 0x00FF, 0xFFFF};
short GMobiles2[18] = {0xFF00, 0xFF01, 0xFF02, 0xFF03, 0xFF04, 0xFF05, 0xFF06, 0xFF07, 0xFF08, 0xFF09, 0xFF0A, 0xFF0B, 0xFF0C, 0xFF0D, 0xFF0E, 0xFF0F, 0xFFFF, 0xFFFF};
When I compile, I get the following message:
[Warning] narrowing conversion of '65280' from 'int' to 'short int' inside { } [-Wnarrowing]
for each element that contains FF, like 0xFF0D or 0xFFFF
Also, I always get access violation. Why? How could I fix that?