title: priority queue and structs
body: <pre><code>#include &lt;iostream&gt;
  #include &lt;queue&gt;
  using namespace std;
  struct Call
  {
      Call( int callNum, long callTime, int callLength ) :
      CallNum( callNum ), CallTime( callTime ), CallLength( callLength ) { }
      int CallNum;
      long CallTime;
      int CallLength;
  };
  
  bool operator&gt;( const Call&amp; lhs, const Call&amp; rhs ) {
      return lhs.CallLength &gt; rhs.CallLength;
  }
  
  ostream&amp; operator&lt;&lt;( ostream&amp; os, const Call&amp; c ) {
      os &lt;&lt; c.CallNum &lt;&lt; " " &lt;&lt; c.CallTime &lt;&lt; " " &lt;&lt; c.CallLength;
      return os;
  }
  
  int main()
  {
      priority_queue&lt; Call, vector&lt;Call&gt;, greater&lt;Call&gt; &gt; q; 
      q.push( Call( 1, 200, 150 ));
      q.push( Call( 2, 300, 950 ));
      q.push( Call( 3, 100, 450 ));
      q.push( Call( 4, 150, 320 ));
      unsigned i=0, n=q.size();
      for ( i=0; i&lt;n; ++i ) {
          cout &lt;&lt; q.top() &lt;&lt; endl;
          q.pop();
      }
  }
  </code></pre>
  
  <p>This is my code. My problem is, When I use <code>q.top();</code> it prints to screen <code>callNum, callTime, callLength</code>. But I want to use them seperately. </p>
  
  <p>I mean How can I print to screen just callTime? for ex: <code>q.top(callTime);</code> or something else? who can help me? </p>