Bemærk
Adgang til denne side kræver godkendelse. Du kan prøve at logge på eller ændre mapper.
Adgang til denne side kræver godkendelse. Du kan prøve at ændre mapper.
'specifier': an iteration variable cannot have any storage-class specifiers
Remarks
A storage class can't be specified on an iteration variable. For more information, see Storage classes (C++) and for each, in.
Example
The following example generates C3286, and also shows correct usage.
// C3286.cpp
// compile with: /clr
int main() {
array<int> ^p = { 1, 2, 3 };
for each (static int i in p) {} // C3286
for each (int j in p) {} // OK
}