title: How to print the contents of a Queue
body: <p>I can't figure out what I am doing wrong here. I am trying to print out my entire queue (which holds weather history) and it won't work. When I try and debug it, it shows me that it is holding the values in the queue correctly, but not assigning it correctly. How can i output the contents of my queue correctly? Here is my code:</p>
  
  <p>Temp.cpp </p>
  
  <pre><code>ostream &amp;operator&lt;&lt;( ostream &amp;out, Temperature &amp;p)//Overloaded Method to output the data
  {    
  fstream myEngFile5;
  string tempLine5;
  string tempLine6;
  myEngFile5.open("English.txt");
  myEngFile5.seekg(335);
  getline(myEngFile5, tempLine5);
  out&lt;&lt;tempLine5&lt;&lt;p.value; //The Temperature is __
  myEngFile5.seekg(356);
  getline(myEngFile5, tempLine6);
  out&lt;&lt;tempLine6&lt;&lt;"\n"; //F
  return out;
  }
  </code></pre>
  
  <p>Temp.h</p>
  
  <pre><code>int getTemp();
  int getTemp2();
  
  Temperature()
  {
  value=0;
  }
  
  Temperature(int v)
  {
  value=v;
  }
  friend ostream &amp;operator&lt;&lt;(ostream &amp;out,Temperature &amp;p);
  </code></pre>
  
  <p>Source.cpp</p>
  
  <pre><code>queue&lt;int&gt;temp;//decalred in the begining
  .
  .
  .
  for(int i=0; i&lt;temp.size(); i++){
  int qSize=temp.size();
  Temperature p2(temp.front());
  while( !temp.empty()){
  cout&lt;&lt;p2;
  temp.pop();}
  }
  </code></pre>