title: Iterating through two maps in c++
body: <p>I would like to loop through two maps at the same time, how could I achieve this?</p>
  
  <p>I have two vectors want to print both, can I do two time <code>(auto it : mymap)</code>  within one for? Something like:</p>
  
  <pre><code>for (auto it: mymap &amp;&amp; auto on: secondMap)
  </code></pre>
  
  <p>is this even allowed?</p>
  
  <p>I am trying to print values like <code>(value1, value2)</code> where each of the values is in a different map. The maps do not necessarily contain the exact same items but the key is an Instruction and the value is an integer, so if I have a element in the map for <code>value2</code>, then not necessarily there is a <code>value1</code> corresponding to the same key, but in that case it should be 0 which is the default integer value.</p>
  
  <p>Any ideas?</p>
  
  <p>Perhaps it is possible to combine two iterators, one for each map?</p>
  
  <p>Kind regards,
  Guus Leijsten </p>