title: RunTime Error : map/set iterators incompatible
body: <p>I have a runtime error "map/set iterators incompatible" at line 8.</p>
  
  <pre><code>void Manager::Simulate(Military* military, Shalishut* shalishut,char* args[]){
      Simulation* simulation = Simulation::GetInstance();
      Time* time = Time::GetInstance();
  
      multimap&lt;int,Task*&gt;::iterator itTasks;
      itTasks = simulation-&gt;GetTasks().begin();
      while(itTasks != simulation-&gt;GetTasks().end()){
        while (itTasks-&gt;second-&gt;GetTimeStamp() == time-&gt;GetTime()){ /*line 8 - ERROR*/
              TaskExecute(itTasks-&gt;second,military,shalishut,args);
              itTasks++;
          }
          // Unit take car of vehicles
          time-&gt;TimeIncrease();
      }
  
  }
  </code></pre>
  
  <p><code>Simulation</code> is declared as a <code>multimap&lt;int,Task*&gt;</code>. What is the problem?</p>