共用方式為


編譯器錯誤 C3017

OpenMP 'for' 陳述式中的終止測試格式不當

OpenMP 陳述式中的 for 迴圈必須完整且明確地指定。

下列範例會產生 C3017:

// C3017.cpp
// compile with: /openmp
int main()
{
   int i = 0, j = 10;

   #pragma omp parallel
   {
      #pragma omp for
      for (i = 0; i; ++i)   // C3017
      // Try the following line instead:
      // for (i = 0; i < 10; ++i)
         ;
   }
}