How to have a tri-state 'boolean' in c++
<p>What is the best way to have three value Boolean variable in c++?</p>

<p>I would like to have fields set to <code>true</code>, <code>false</code> or not set at all in my array.</p>

<p>If I declare them this way:</p>

<pre><code>t[0] = true;
t[1] = false;
t[2] = NULL;
</code></pre>

<p>When I test the condition I get:</p>

<p><code>t[2]</code> is <code>false</code></p>