Home > Software Tutorial > Computer Software > Detailed operation explanation of editing C++ in vs2010 (Visual Studio) and solving cmd crash problem

Detailed operation explanation of editing C++ in vs2010 (Visual Studio) and solving cmd crash problem

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2024-06-08 16:25:30
Original
1111 people have browsed it

Faced with the problem of cmd crashing when C++ code is compiled in Visual Studio 2010, PHP editor Xiaoxin has specially compiled a detailed operation guide to solve this problem for you. In this guide, we'll walk through the potential causes of this issue and provide proven solutions. Continue reading below to learn how to successfully resolve this issue so you can smoothly edit C++ code in Visual Studio.

1. Open the vs2010 (Visual Studio) software, click File->New->Project, and click the small triangle on the left side of Visual C++ in the pop-up dialog box, which means that the new project is C++.

在vs2010(Visual Studio)中编辑C++并解决cmd闪退问题的详细操作讲解 在vs2010(Visual Studio)中编辑C++并解决cmd闪退问题的详细操作讲解

2. After expanding, click General, then click the empty project, then enter the name of the project to be created in [Name] below, and click [Browse] behind [Location] 】button to select the location where you want to store the project.

在vs2010(Visual Studio)中编辑C++并解决cmd闪退问题的详细操作讲解 在vs2010(Visual Studio)中编辑C++并解决cmd闪退问题的详细操作讲解

3. After completion, you can see the new project in the [Solution Explorer] on the right. The project name is the name you just gave yourself.

在vs2010(Visual Studio)中编辑C++并解决cmd闪退问题的详细操作讲解

4. Right-click on [Source File] in the project, then click [Add]->[New Item], click the C++ file in the pop-up dialog box, and click Enter the name and location below, click Add, and then write the code in the pop-up edit box.

在vs2010(Visual Studio)中编辑C++并解决cmd闪退问题的详细操作讲解 在vs2010(Visual Studio)中编辑C++并解决cmd闪退问题的详细操作讲解 在vs2010(Visual Studio)中编辑C++并解决cmd闪退问题的详细操作讲解

5. After writing a small program, when you click the green triangle run symbol above, you will find that the pop-up cmd flashes and disappears. The solution is to click Project->Properties (what is the project name, that is + properties).

在vs2010(Visual Studio)中编辑C++并解决cmd闪退问题的详细操作讲解

6. In the pop-up dialog box, click Configuration Properties->Linker->System, select the console (/SUBSYSTEM:CONSOLE) in the subsystem on the right, and click OK, press Ctrl+F5 to run at this time to make cmd stay.

Note: You must press Ctrl+F5 to stop cmd, otherwise it will still crash.

在vs2010(Visual Studio)中编辑C++并解决cmd闪退问题的详细操作讲解

The above is the detailed content of Detailed operation explanation of editing C++ in vs2010 (Visual Studio) and solving cmd crash problem. For more information, please follow other related articles on the PHP Chinese website!

source:zol.com.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template