Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Compiler Error C2731
Collapse the table of content
Expand the table of content

Compiler Error C2731

Error Message

'identifier' : function cannot be overloaded

The functions main, WinMain, DllMain, and LibMain cannot be overloaded.

The following sample generates C2731:

// C2731.cpp
extern "C" void WinMain(int, char *, char *);
void WinMain(int, short, char *, char*);   // C2731

Community Additions

© 2015 Microsoft