Assigning multiple integers to a character array in binary
<p>I have three integers (4 bytes of memory for each integer) and I want to assign each of their binary values to a character array with 12 elements. So, if each integer had a value of let's say 2, then I want the character array to have these values:</p>

<pre><code>2 0 0 0 2 0 0 0 2 0 0 0
</code></pre>

<p>I have tried:</p>

<pre><code>memcpy(cTemp, &amp;integer1 + &amp;integer2 + &amp;integer3, 12);
</code></pre>

<p>but I receive an "invalid operands" compiler error. </p>

<p>I have also found the function strcat referenced here: <a href="http://www.cplusplus.com/reference/clibrary/cstring/" rel="nofollow">http://www.cplusplus.com/reference/clibrary/cstring/</a></p>

<p>However it is mentioned as: "The terminating null character in destination is overwritten by the first character of source" which I obviously don't want since most of the times integers will have a null character at the end unless the value is really large. Does anybody know of a better working method? Any help is appreciated.</p>
