Is the C++ compiler really smart enough to distinguish between multiply and dereference?
<p>I have the following line of code:</p>

<pre><code>double *resultOfMultiplication = new double(*num1 * *num2);
</code></pre>

<p>How does the compiler know which <code>*</code> is used for derefencing and which <code>*</code> is used for multiplication?  </p>

<p>Also, and probably a more important question is in this case is <code>double</code> a primitive (like in Java) or an object?  If it's a primitive how can I create a <code>new</code> one?</p>
