We recommend using Visual Studio 2017

Compiler Error C3154


The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Compiler Error C3154.

Expected ',' before ellipsis. Non-comma separated ellipsis not supported on parameter array functions.

A variable argument function was not declared correctly.

For more information, see Variable Argument Lists (...) (C++/CLI).

The following sample generates C3154.

// C3154.cpp  
// compile with: /clr  
ref struct R {  
   void Func(int ... array<int> ^);   // C3154  
   void Func2(int i, ... array<int> ^){}   // OK  
   void Func3(array<int> ^){}   // OK  
   void Func4(... array<int> ^){}   // OK  
int main() {  
   R ^ r = gcnew R;