title: Priority Queue Compilation Error
body: <p>I'm attempting to compile the code below, but the compiler gives the error </p>
  
  <pre><code>Struct.h:38:9: error: ‘priority_queue’ in namespace ‘std’ does not name a type
  </code></pre>
  
  <p>Several searches failed to reveal an answer so I'm hoping you guys can help out. The code was partially based on the sample code given at the c++ reference site.</p>
  
  <pre><code>struct aimedShot;
  union moveFunc;
  struct timeCommand;
  
  struct aimedShot
  {
      void (*move) (Dot*, SDL_Event&amp;, double x, double y);
      double x;
      double y;
  };
  
  //Holds the kind of function used
  union moveFunc
  {
      void (*notAimed) (Dot*);
      aimedShot aimed;
  };
  
  //Dot to be operated on and the appropriate operator with time
  struct timeCommand
  {
      Dot* target;    
      moveFunc command;
      int time;
      bool type; //True indicates aimed (integer inputs), False indicates unaimed
   }; 
  
  class CompareCommand
  {
       public:
       bool operator()(timeCommand&amp; c1, timeCommand&amp; c2) //Return true if c1 comes first
      {
          return (c1.time &lt; c2.time);
      }
  };
  
  typedef std::priority_queue&lt; timeCommand, std::vector&lt;timeCommand&gt;, CompareCommand&gt; commandTimeline;
  </code></pre>