Getting int from char array
<p>I'm having a problem getting an integer from a char[]. I's a really simple line of code, but I can't see where the problem is.<br>
This is the code:</p>

<pre><code>char* rawd = .....
int resultSize = ((int*)rawd)[0];

cout &lt;&lt; "BYTES ::: " &lt;&lt; (int)(rawd[0]) &lt;&lt; " " &lt;&lt; (int)(rawd[1]) &lt;&lt; " " &lt;&lt; (int)(rawd[2]) &lt;&lt; " " &lt;&lt; (int)(rawd[3]) &lt;&lt; endl;
cout &lt;&lt; "SIZE RETURNED :::::: " &lt;&lt; resultSize &lt;&lt; endl;
</code></pre>

<p>This is what is printed:</p>

<pre><code>BYTES ::: 0 0 4 0
SIZE RETURNED :::::: 262144
</code></pre>

<p>And I'm expecting <code>resultSize</code> to be 1024.</p>

<p>Why does <code>resultSize</code> contain 262144 intead of 1024?</p>
