Based on my understanding, the name mangling is used when overloading a function, so functions with the same name can be distinguished.
But I noticed that the name mangling is also used with a function WinMain()(which is not overloaded). After changing the name, he becomes _WinMain@16.
So why is the name mangling used with the function used WinMain()?
This is the code I used:
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
return 0;
}
source
share