How can I define this value(s) in a good and easy way?
<p>I am stuck in a conversion / definition of a function parameter and would very much appreciate some help. I am sure it's an easy one for any experienced c/c++ guy, but not for me, not right now.</p>

<p><strong>Problem:</strong></p>

<p>creating the right paramter to use with <code>myCommmand(uint8 *pAddr)</code>, which will execute <code>send(pAddr, 6)</code>, which will use those parameters to loop the following 6 times:</p>

<p><code>write(reinterpret_cast&lt;unsigned char*&gt;(pAddr)[i]);</code></p>

<p>my trouble is, that pAddr has to point to an array of 6 bytes, which i most preferably would like to define as unsigned byte values (0-255) or as hex 00-FF.</p>

<p><strong>Restrictions</strong></p>

<p>Functions shall not be changed. It is just about creating the parameters.</p>

<p><strong>My attemps:</strong></p>

<pre><code>uint8 Addr[] = {00,22,122,205,16,04};
uint8 *pAddr = &amp;Addr;
</code></pre>

<p>but this results in error C2440 (can't convert uint(*)[6] to uint8 *).</p>

<p><strong>Desired solution</strong></p>

<p>I would lik to know a <em>good</em>, wellformed way to create thise Addr-array or stream, or object to pass on to my functions, by writing their byte or hex values into my code - like in my attempt. I can use <em>boost</em>-libraries. Thanks to all helping me out with this!</p>
