how to Read in a list of values store it in a queue and change the order of the inputs?
<p>How to Read in a list of values store it in a queue and change the order of the inputs?</p>

<p>For example, read in <code>abc123efgh45678</code> and display <code>a1b2c3d4e5f6g7h8</code></p>

<p>I know I can use queue to read in the values. </p>

<p>But how do I assign <code>a</code> to go beside <code>1</code>, eg. <code>a1</code>?</p>

<pre><code>queue &lt;char&gt; q ;

for (int j=0; j &lt; input.size(); j++) {
  q.push (input[j]);
}
</code></pre>
