Issue: The program crashes regardless of whether I press F5 or CTRL F5 when running the program.
Solution:
Note: This method only applies to the current project and needs to be modified after creating a new project.
Click on the top left corner of the project.
Select project name properties (P)... (ALT+F7)
Go to the VC2010_Test properties page, click on the left side Configuration Properties -> Linker -> System.
Click on the blank line on the right side of the subsystem, select Console (/SUBSYSTEM).
Click on Apply in the bottom right corner, and then click OK.
Then press CTRL F5 to run the program again, and the program will no longer crash.
Note: This method only applies to the current project and needs to be modified after creating a new project.