Kompilatorfel C3397

Aggregerad initiering tillåts inte i standardargument

Anmärkningar

En matris har deklarerats felaktigt. Mer information finns i Matriser .

Example

I följande exempel genereras 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
}