title: OpenMP - Iterator in the For-loop
body: <pre><code>#pragma omp parallel for reduction(+ : numOfVecs)
  for(itc=clus.begin() ; itc!=clus.end() ; itc++)
  {
      numOfVecs += (*itc)-&gt;getNumOfVecs();
  
  }
  </code></pre>
  
  <p>I have a couple of codes like the code above where I need iterators in the loop. But I get the error 'invalid controlling predicate'. Is there any way to overcome this?</p>
  
  <p>Thanks in advance</p>
  
  <hr>
  
  <p>By the way I'm using the latest versions of code::blocks and mingw. I'm new to this but I think they support openmp3.0 by default after -fopenmp. The iterator I'm using is list iterator.</p>