Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building and running C++ console application with standard 'main' entry in VS (2010)

I am using Visual Studio 2010 and started console application project.

VS generates the entry point as _tmain(int argc, wchar_t *argv[]). Instead, I need the entry point main(int argc, char *argv[]) - just a standard console application.

What are the settings that I need to change from defaults and how does it work?

like image 563
paulius_l Avatar asked Oct 09 '22 05:10

paulius_l


1 Answers

Simply create an empty console project (there's a setting when you pick the project type), then add a "main.cpp" file and add the standard main function. Works every time for me. Actually, I never use the premade/generated C++ projects due to overhead, precompiled headers, etc.

like image 182
Mario Avatar answered Oct 13 '22 11:10

Mario