title: How to convert a string to uppercase using a Queue?
body: <pre><code>#include&lt;iostream&gt;
  #include&lt;queue&gt;
  #include&lt;string&gt; // probally not needed
  #include&lt;cctype&gt;
  using namespace std;
  int main()
  {
  queue &lt;string&gt; str; // i created some kind of vector queue
  cout &lt;&lt; &quot;Please enter a string.&quot; &lt;&lt; endl;
  string temp; 
  cin &gt;&gt; temp; // grabs the string
  if(temp != &quot;&quot;) // checks if string is empty
  {
   str.push(temp); // pushes it onto queue
   for(int i = 0; i &lt; temp.size(); i++) // suppose to go through 
   //each element in queue
      {
         //str.pop(temp); /pops an element as requied by assignment
          toupper(i); // suppose to turn each letter upper case
      }
  }
  else 
  {
      exit(0); // exits the program if string is empty
  }
  cout &lt;&lt; temp; // suppose to display queue, that should be in 
  //upper case form.
  
  return 0;
  }
  </code></pre>
  <p>I'm still fairly new to programming and I don't know to implement a queue into a string. The problem is the for loop isn't going through each letter, so they can't be put in upper case by the (toUpper()).</p>
  <p>Prompt: &quot;Write a program that gets a sentence (string) from a user and puts it into a queue of characters. The program should then dequeue each character, convert it to uppercase and store the result as a sentence (string). Print the result of this process&quot;.</p>