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.
Aggregate initialization is not allowed in default arguments
Remarks
An array was declared incorrectly. See Arrays for more information.
Example
The following example generates C3397.
// C3397.cpp
// compile with: /clr
// /clr /c
void Func(array<int> ^p = gcnew array<int> { 1, 2, 3 }); // C3397
void Func2(array<int> ^p = gcnew array<int> (3)); // OK
int main() {
array<int> ^p = gcnew array<int> { 1, 2, 3}; // OK
}