description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | ||
---|---|---|---|---|---|---|---|
Learn more about: Compiler Error C3052 |
Compiler Error C3052 |
11/04/2016 |
|
|
87480c42-1ceb-4775-8d20-88c54a7bb6a6 |
'var' : variable doesn't appear in a data-sharing clause under a default(none) clause
If default(none) is used, any variable used in the structured block must be explicitly specified as either shared or private.
The following sample generates C3052:
// C3052.cpp
// compile with: /openmp /c
int main() {
int n1 = 1;
#pragma omp parallel default(none) // shared(n1) private(n1)
{
n1 = 0; // C3052 use either a shared or private clause
}
}