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