Compiler Warning (level 1) C4572
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

Compiler Warning (level 1) C4572

Error Message

[ParamArray] attribute is deprecated under /clr, use '...' instead

An obsolete style for specifying a variable argument list was used. When compiling for the CLR, use ellipsis syntax instead of ParamArrayAttribute. For more information, see How to: Accept Variable Arguments.


The following sample generates C4572.

// C4572.cpp
// compile with: /clr /W1
void Func([System::ParamArray] array<int> ^);   // C4572
void Func2(... array<int> ^){}   // OK

int main() {
   Func2(1, 2, 3);
© 2015 Microsoft