In C++ what causes an assignment to evaluate as true or false when used in a control structure?
<p>So can someone help me grasp all the (or most of the relevant) situations of an assignment inside something like an if(...) or while(...), etc?</p>

<p>What I mean is like:</p>

<pre><code>if(a = b)
</code></pre>

<p>or</p>

<pre><code>while(a = &amp;c)
{
}
</code></pre>

<p>etc...</p>

<p>When will it evaluate as true, and when will it evaluate as false? Does this change at all depending on the types used in the assignment? What about when there are pointers involved?</p>

<p>Thanks.</p>
