title: How to iterate two vectors in one for loop?
body: <p>I'm only showing my functions because I believe the problem is in my <code>for</code> loop.</p>
  <pre><code>DataStoreVectors::DataStoreVectors() {
  }
  
  void DataStoreVectors::addItem(string item1, int item2) {
      videoGame.push_back(item1);
      gameSize.push_back(item2);
  }
  
  void DataStoreVectors::listItems()
  {
      vector &lt;string&gt;::iterator pv;
      vector &lt;int&gt;::iterator px;
      for (pv = videoGame.begin(); pv &lt; videoGame.end(); pv++)
      {
          for (px = gameSize.begin(); px &lt; gameSize.end(); px++)
              cout &lt;&lt; *pv &lt;&lt; &quot; &quot; &lt;&lt; *px &lt;&lt; endl;
      }
  }
  </code></pre>
  <p>When I try to print out the data in my two arrays, it prints out the name of each video game about 6 times and assigns my <code>int</code> values to them like so:</p>
  <pre><code>Valorant 8
  Valorant 70
  Valorant 50
  Valorant 1
  Valorant 26
  Valorant 35
  Fortnite 8
  Fortnite 70
  Fortnite 50
  Fortnite 1
  Fortnite 26
  Fortnite 35
  Doom Eternal 8
  Doom Eternal 70
  Doom Eternal 50
  Doom Eternal 1
  Doom Eternal 26
  Doom Eternal 35
  Minecraft 8
  Minecraft 70
  Minecraft 50
  Minecraft 1
  Minecraft 26
  Minecraft 35
  Apex Legends 8
  Apex Legends 70
  Apex Legends 50
  Apex Legends 1
  Apex Legends 26
  Apex Legends 35
  Control 8
  Control 70
  Control 50
  Control 1
  Control 26
  Control 35
  </code></pre>
  <p>Is this possible? Would it be better to make a struct? I'm trying to figure out the right way to print out two vectors side by side.</p>