У меня есть двумерный массив, как показано ниже.
unsigned char myArray[][48] = {
{0xfc,0x94,0x88,0x48,0x5f,0xa4,0x9a,0xfb,0x6e,0xf8,0xcd,0x01,0x47,0x64,0x03,0xd0,0x1f,0xb8,0xa3,0x85,0x84,0xa9,0x4a,0xc4,0x9e,0xea,0x26,0x09,0x62,0x96,0x91,0xa6},
{0xa9,0xc5,0x9a,0xb3,0x09,0x38,0x15,0xb3,0x22,0xb3,0x07,0x21,0x3e,0x39,0x35,0xc6,0x69,0x6e,0xf3,0x64,0xb0,0x0a,0x4c,0xcb,0x77,0xff,0x76,0x3c,0x37,0xf3,0x99,0x96},
{0x24,0x4d,0xc0,0x45,0xe0,0x50,0x1f,0x72,0x0f,0xb0,0xcc,0xb9,0xc6,0x72,0xa9,0x5a,0xf3,0x5a,0xd9,0xe2,0xc3,0x44,0xd9,0x25,0xf3,0x12,0x6a,0x0c,0x37,0x6a,0x3f,0xb6},
{0xd3,0x91,0x98,0xfd,0xcd,0x6e,0x01,0x44,0xfc,0xf7,0x5d,0x08,0xab,0xbc,0x43,0xab,0xd3,0x4a,0xd9,0x07,0xa7,0x8e,0xda,0xba,0xb5,0x8a,0x27,0xe1,0xc6,0x7a,0xfe,0xee},
{0x5f,0x08,0xcc,0x01,0x17,0xde,0xbb,0x99,0x19,0xf3,0x0d,0xd7,0x08,0x5f,0xcd,0xe3,0xe0,0x24,0x54,0xee,0x16,0x68,0xe1,0x64,0x41,0x58,0x09,0xd8,0xf7,0x93,0x8f,0xf1,0xf0,0x00,0xd7,0xd4,0x5b,0x6b,0x8d,0x1e,0x18,0x06,0x1f,0x70,0x6a,0x40,0x86,0x38}
};
Когда я получаю myArray [0], это не 36 байтов, как мы видим; вместо этого это 48. Как я могу получить 36 байтов, как мы видим в массиве, не указывая его размер, 36, получая его.
{0xfc,0x94,0x88,0x48,0x5f,0xa4,0x9a,0xfb,0x6e,0xf8,0xcd,0x01,0x47,0x64,0x3,0xd0,0x1f,0xb8,0xa3,0x85,0x84,0xa9,0x4a,0xc4,0x9e,0xea,0x26,0x09,0x62,0x96,0x91,0xa6}
NSData *row1 = [NSData dataWithBytes:url[0]
length:(sizeof(myArray[0])/sizeof(unsigned char))];