title: Is it possible to use if statement outside a function (like main)?
body: <p>I'm implementing a BOOOS - Basic oriented-Object Operational System, and now I need to make my program's scheduler choose between FCFS and Priority. I have a class called Task, where I create two queues: <code>std::queue</code> and a <code>std::priority_queue</code>. Those queues are static members declared in Task.h, and I need to initialize then before any other thing in the Task.cc with the others static members of the class, like this:</p>
  
  <pre><code>namespace BOOOS {
  
      volatile Task * Task::__running;
      Task * Task::__main;
      int Task::__tid_count;
      int Task::__task_count;
      std::queue&lt;Task*&gt; Task::__ready;
      std::priority_queue&lt;Task*&gt; Task::__ready;
  
      (rest of the Task.cc)
  
  }
  </code></pre>
  
  <p>You can see that I have two __ready queues. That's why I need to use only one of then. If the user want to initialize a FCFS Scheduler, I use the one with no priority, and if the user want a priority Scheduler, I use the priority_queue. This is controlled by a BOOOS's static enum member. So, here's my question: Can I use something similar to <code>if</code> in this part of the code to choose only one queue instead of creating two and make an <code>if</code> everytime I need to manipulate it in my program?</p>