Export (0) Print
Expand All
Expand Minimize
0 out of 2 rated this helpful - Rate this topic

Compiler Error C3016

Error Message

'var' : index variable in OpenMP 'for' statement must have signed integral type

The index variable in an OpenMP for statement must be a signed integral type.

The following sample generates C3016:

// C3016.cpp
// compile with: /openmp
int main()
{
   #pragma omp parallel
   {
      unsigned int i = 0;
      // Try the following line instead:
      // int i = 0;

      #pragma omp for
      for (i = 0; i <= 10; ++i)   // C3016
      {
      }
   }
}
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.