I am currently working on a console application for Windows 10 and am wondering what the main() entry point should be.
In Jeffrey Richter and Christophe Nasarre's "Windows via C/C++" (2007) on page 69, it states:
Your Windows application must have an entry-point function...as a C/C++ developer, there are two possible entry-point function you can use:
int WINAPI _tWinMain(HINSTANCE hInstanceExe, HINSTANCE, PTSTR pszCmdLine, int nCmdShow); int _tmain(int argv, TCHAR *argv[], TCHAR *envp[]);
The book goes on to identify that these two entry points are actually mapped to different entry points by the compiler, depending on whether the application is GUI or Console and whether Unicode is used.
I would like to use the correct entry point for a Win32 console app using Unicode, so I am assuming(?), I want the _tmain version, however when I open a new project in Visual Studio 2015 Community Edition and select "Win32 Console app", and then select "Console Application", I end up with main() like I'm used to under Linux:
int main()
Which entry point should I be using ?