C++: malloc : error: invalid conversion from ‘void*’ to ‘uint8_t*’
<p>I got this problem:</p>

<p>invalid conversion from ‘void*’ to ‘uint8_t*’</p>

<p>When doing this:</p>

<pre><code>int             numBytes;
uint8_t         *buffer;

buffer=malloc(numBytes); //error here, why?
</code></pre>

<p>or must I have to put it like this?</p>

<pre><code>buffer=malloc(numBytes); 
</code></pre>

<p>Please explain...</p>

<p>Thanks in advance.</p>
