The code below doesn’t work.
#include<iostream>
class Application
{
public:
static int main(int argc, char** argv)
{
std::cin.get();
}
};
I thought that static member functions are just the same as normal functions, and static WinMain works fine. Why doesn’t static main work?
well, I think i somewhat got begin to understand, thank you for all the answers.
Simply because the standard says so (3.6.1):
What you have is a valid function, but it’s not the program entry point.