Skip to main content
Modified based on other answer
Source Link
jantje
  • 1.4k
  • 1
  • 8
  • 16

You can do it like this

byte c1[] = {0x01, 0x00, 0x01, 0x00, 0x11, 0x01,0x11, 0x00, 0x01 };  
byte a1[]*a1 = c1;  
byte a2[]*a2 = c1+3;
byte a3[]*a3 = c1+6;

Note that This does not make a copy byt you can access the C1 and a1 a2 and a3 as you liked.

You can do it like this

byte c1[] = {0x01, 0x00, 0x01, 0x00, 0x11, 0x01,0x11, 0x00, 0x01 };  
byte a1[] = c1;  
byte a2[] = c1+3;
byte a3[] = c1+6;

Note that This does not make a copy byt you can access the C1 and a1 a2 and a3 as you liked.

You can do it like this

byte c1[] = {0x01, 0x00, 0x01, 0x00, 0x11, 0x01,0x11, 0x00, 0x01 };
byte *a1 = c1;
byte *a2 = c1+3;
byte *a3 = c1+6;

Note that This does not make a copy byt you can access the C1 and a1 a2 and a3 as you liked.

Source Link
jantje
  • 1.4k
  • 1
  • 8
  • 16

You can do it like this

byte c1[] = {0x01, 0x00, 0x01, 0x00, 0x11, 0x01,0x11, 0x00, 0x01 };  
byte a1[] = c1;  
byte a2[] = c1+3;
byte a3[] = c1+6;

Note that This does not make a copy byt you can access the C1 and a1 a2 and a3 as you liked.