What really are the valid signatures for main function in C? I know:
int main(int argc, char *argv[])
Are there other valid ones?
http://en.wikipedia.org/wiki/Main_function_(programming)#C_and_C.2B.2B
Besides the usual int main(int argc, char *argv[])
and the POSIX int main(int argc, char **argv, char **envp)
, on Mac OS X also supports
int main(int argc, char* argv[], char* envp[], char* apple[]);
Of course it's Mac-only.
On Windows there's
int wmain(int argc, wchar_t* argv[], wchar_t* envp[]);
as the Unicode (actually, wide-character) variant. Of course there is WinMain
too.