Compiler Warning (level 1) C4829

 

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 Warning (level 1) C4829.

Possibly incorrect parameters to function main. Consider 'intmain(Platform::Array<Platform::String^>^ argv)'

Certain functions, such as main, cannot take reference type parameters. While compilation will succeed, the resulting image will probably not run.

The following sample generates C4829:

// C4829.cpp  
// compile by using: cl /EHsc /ZW /W4 /c C4829.cpp  
int main(Platform::String ^ s) {}   // C4829  
  

Show: