Teilen über


Compilerfehler C3397

Die Aggregatinitialisierung ist in Standardargumenten nicht zulässig.

Bemerkungen

Ein Array wurde falsch deklariert. Weitere Informationen finden Sie unter Arrays .

Beispiel

Im folgenden Beispiel wird C3397 generiert.

// 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
}