Copying Bytes to Bytes Array?
<p>I am learning and I'd like to know the best way how to do the following array copy, Consider this code:</p>

<pre><code>void Cast1LineSpell(UINT Serial, char *chant)
{
    byte packet[] = { 0x0F, 0x03, 
        (Serial &gt;&gt; 24) &amp; 0xFF, (Serial &gt;&gt; 16) &amp; 0xFF,(Serial &gt;&gt; 8) &amp; 0xFF, Serial &amp; 0xFF, 
        0x9A, 0x92, 0x00, 0x00, 0x00, 0x1A };

    byte prepareSpell[2] = { 0x4D, 0x01 };

    byte chant_length = sizeof(chant) / sizeof(chant[0]);
    byte chant_name[] = { 0x4E, chant_length, }; // &lt;= how can i put the bytes in chant* into the rest of this array, and then append bytes 0x00 and 0x4E on to the end of it?
}
</code></pre>

<p>how can i put the bytes that are inside of <code>*chant</code>, and then put them into the end of <code>chant[]</code> and then append bytes <code>0x00</code> and <code>0x4E</code> on to the end of it?</p>

<p>Can anybody provide a solution?
Much Appreciated.</p>
