title: Increment the value of a map
body: <p>need your help and better if you can help me fast. It is very trivial problem but still can't understand what exactly i need to put in one line.</p>
  
  <p>The following code i have</p>
  
  <pre><code>for (busRequest = apointCollection.begin(); busRequest != apointCollection.end(); busRequest++)
  {
      double Min = DBL_MAX;
      int station = 0;
  
      for (int i = 0; i &lt; newStations; i++)
      {
  
          distance = sqrt(pow((apointCollection2[i].x - busRequest-&gt;x1), 2) + pow((apointCollection2[i].y - busRequest-&gt;y1), 2));
          if (distance &lt; Min)
          {
              Min = distance;
              station = i;
  
          }
      }
  
      if (people.find(station) == people.end())
      {
          people.insert(pair&lt;int, int&gt;(station, i));
      }
  
      else
      {
          how can i increment "i" if the key of my statation is already in the map.
      }
  
  }
  </code></pre>
  
  <p>Just briefly what i do , i take the first busrequest go to the second loop take the first station and find the minimum distance. After i go over the second loop , i add that station with minimum distance to my map . After i proceed with all my loops and if there is the same station , i need to increment it , so it means that that station is using two times and etc.</p>
  
  <p>I need the help just give me hint or provide the line that i need to add.</p>
  
  <p>I thank you in advance and waiting for your help.</p>