user25974: I have three byte arrays. I first change their values during runtime and after that I want to combine them into one bigger 4th array.
byte a1[] = { 0x01, 0x00, 0x01 };
byte a2[] = { 0x00, 0x11, 0x01 };
byte a3[] = { 0x11, 0x00, 0x01 };

byte c1[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

I first tried this, but it did not compile.
c1 = a1 + a2 + a3;

I also tried strcat() and I did got a error.

user18478: 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.

user972: You can concatenate with memcpy. You just need to set the pointer at the right place inside the c1 array.
memcpy(c1, a1, sizeof(a1));
memcpy(c1+sizeof(a1), a2, sizeof(a2));
memcpy(c1+sizeof(a1)+sizeof(a2), a3, sizeof(a3));


25974: <p>I have three byte arrays. I first change their values during runtime and after that I want to combine them into one bigger 4th array.</p>

<pre><code>byte a1[] = { 0x01, 0x00, 0x01 };
byte a2[] = { 0x00, 0x11, 0x01 };
byte a3[] = { 0x11, 0x00, 0x01 };

byte c1[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
</code></pre>

<p>I first tried this, but it did not compile.</p>

<pre><code>c1 = a1 + a2 + a3;
</code></pre>

<p>I also tried <code>strcat()</code> and I did got a error.</p>
 18478: <p>You can do it like this</p>

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

<p>Note that This does not make a copy byt you can access the C1 and a1 a2 and a3 as you liked.</p>
 972: <p>You can concatenate with <code>memcpy</code>. You just need to set the pointer at the right place inside the <code>c1</code> array.</p>

<pre><code>memcpy(c1, a1, sizeof(a1));
memcpy(c1+sizeof(a1), a2, sizeof(a2));
memcpy(c1+sizeof(a1)+sizeof(a2), a3, sizeof(a3));
</code></pre>
