How to asign a value to a pointer that points to NULL
<p>I have a pointer that points to null, and i want to assign it a value. But if i deference it, I get an error. I have tried this:</p>

<pre><code>*nullPointer=value;
</code></pre>

<p>but like I said, I get an error. How can I do this?. I can't do</p>

<pre><code>nullPointer=&amp;value
</code></pre>

<p>Because later value (it's an object) is deleted and nullPointer would point to invalid memory.</p>
