Compilerfout C3397

Initialisatie van aggregaties is niet toegestaan in standaardargumenten

Opmerkingen

Een array is onjuist gedeclareerd. Zie Matrices voor meer informatie.

Example

In het volgende voorbeeld wordt C3397 gegenereerd.

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