Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Compiler Error C3016
Collapse the table of content
Expand the table of content

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

Community Additions

© 2015 Microsoft