C++ Loop Through Array, Find Smallest
<p>I'm trying to find the smallest value in 3 different array but it's not turning out right I don't think. It never seems to return the middle array even if it is the smallest. It's always either 0 or 2. What seems to be my logic error?</p>

<pre><code>int smallest;
for(int i = 1; i &lt; 3; i++)
{
    if(queue[i].getCount() &lt; queue[0].getCount())
      smallest = i;
    else
      smallest = 0;
}
</code></pre>
