Compiler Error C2731
'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
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for