Return 1 of 3 values using 2 flag variables as conditions
<p>I need to return 1 value... either e.next_arr, e.next_dept, or e.next_checkout. </p>

<p>There are two flags, f1 &amp; f2. f1 is true if the multiset ( customers picking groceries ) is not empty, and f2 is true if the queue ( customers waiting to checkout ) is not empty.</p>

<p>I know that if the queue is full, you shouldnt return e.next_dept because theres nobody waiting, and you shouldnt return e.next_checkout if the multiset is empty because theres nobody picking groceries...</p>

<p>I cannot figure out the logic to return the lowest of the three values, with regards to the flags.</p>

<p>Here is my method definition..</p>

<pre><code>int update_clock ( const event&amp; e, const bool&amp; f1, const bool&amp; f2 )
{

}
</code></pre>
