C++ Compiler Error C2280 “attempting to reference a deleted function” in Visual Studio 2013 and 2015

From [class.copy]/7, emphasis mine: If the class definition does not explicitly declare a copy constructor, a non-explicit one is declared implicitly. If the class definition declares a move constructor or move assignment operator, the implicitly declared copy constructor is defined as deleted; otherwise, it is defined as defaulted (8.4). The latter case is deprecated if the … Read more

Win32 Console Application

The Win32 templates have been renamed to Windows Desktop. In VS2017, If you want to create the Win32 Console Application,I suggest you could choose File->New->Project. And then choose Windows Desktop Wizard.As shown below: If you want to create Win32 Console Application, you could select Console Application(.exe) in Application type. If you want to create the … Read more

LINK : fatal error LNK1561: entry point must be defined ERROR IN VC++

I installed MS VS VC++ for the first time in order to start programming OpenGL with GLFW library. I follower instructions on how to install it over at http://shawndeprey.blogspot.com/2012/02/setting-up-glfw-in-visual-studio-2010.html Then I wrote this simple program, just to test it, which did work on Eclipse: But then I got this awful error: I know, I’ve looked … Read more

How to keep the console window open in Visual C++?

Start the project with Ctrl+F5 instead of just F5. The console window will now stay open with the Press any key to continue . . . message after the program exits. Note that this requires the Console (/SUBSYSTEM:CONSOLE) linker option, which you can enable as follows: Open up your project, and go to the Solution Explorer. If you’re following along with me … Read more

fatal error LNK1112: module machine type ‘x64’ conflicts with target machine type ‘X86’

I wrote a blog entry about this, as I encountered this maddening problem, and finally yanked my system back into working order. These are the things to check, in this order: Check your properties options in your linker settings at: Properties > Configuration Properties > Linker > Advanced > Target Machine. Select MachineX64 if you are targeting … Read more