Compiler Error C3269

 

For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

For the latest documentation on Visual Studio 2017, see Compiler Error C3269 on docs.microsoft.com. 'function' : a member-function of a managed or WinRTtype cannot be declared with '...'

Managed and WinRT class member functions cannot declare variable-length parameter lists.

The following sample generates C3269 and shows how to fix it:

// C3269_2.cpp  
// compile with: /clr  
  
ref struct A  
{  
   void func(int i, ...)   // C3269  
   // try the following line instead  
   // void func(int i )  
   {  
   }  
};  
  
int main()  
{  
}  

The following sample generates C3269 and shows how to fix it:

// C3269.cpp  
// compile with: /clr:oldSyntax  
#using <mscorlib.dll>  
  
__gc struct A  
{  
   void func(int i, ...)   // C3269  
   // try the following line instead  
   // void func(int i )  
   {  
   }  
};  
  
int main()  
{  
}  

Show: