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