C++: simple passing char*?
<p>I want to simply pass a char as an argument to a function
which should then be modified by the function.
Unfortuantely, when doing it like below the printouts of the
buffers are NOT equal. I do not understand as I pass a
pointer to the char array. Anyone sees the obvious thing
that is missing?</p>

<pre><code>unsigned char* buffer;
doSomething(buffer)
printout(buffer);
</code></pre>

<p>where doSomething() is defined as:</p>

<pre><code>doSomething(unsigned char *buffer)
{
    char* receiveddata;
    Socket.recv(receiveddata);
    buffer = ( unsigned char* ) receiveddata;
    printout(buffer);
}
</code></pre>
