Compiler Error C3015
initialization in OpenMP 'for' statement has improper form
A for
loop in an OpenMP statement must be fully and explicitly specified.
The following sample generates C3015:
// C3015.cpp
// compile with: /openmp
int main()
{
int i = 0, j = 10;
#pragma omp parallel
{
#pragma omp for
for (; i < 0; i += j) // C3015
// Try the following line instead:
// for (i = 0; i < 0; i++)
--j;
}
}
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for