Home>Article>Backend Development> How to write and run C++ programs in Visual C++2010

How to write and run C++ programs in Visual C++2010

coldplay.xixi
coldplay.xixi Original
2021-01-07 14:13:36 55080browse

How to write and run a C program in Visual C 2010: First open the editor, create a new project and enter the name and save location; then select "Source File", right-click, and select [Add - New Item]; then Enter the code; finally click Debug.

How to write and run C++ programs in Visual C++2010

The operating environment of this article: Windows 7 system, Visual C 2010 version, Dell G3 computer.

[Related learning recommendations:C language tutorial video]

How to write and run C programs in Visual C 2010:

1. Open vs2010, select "visual c development settings", and then click "Start Visual Studio".

How to write and run C++ programs in Visual C++2010

#2. Click New Project, then select the empty project under the Visual C label in the pop-up window, enter the name and save location.

How to write and run C++ programs in Visual C++2010

3. In the "Solution Explorer" on the left, select "Source File", right-click, and then select "Add"->"New Item" .

How to write and run C++ programs in Visual C++2010

#4. In the pop-up window, select "C file (.cpp)", enter the file name, and click "Add".

How to write and run C++ programs in Visual C++2010

#5. Now enter the specific code, for example, enter a simple Hello World program.

How to write and run C++ programs in Visual C++2010

6. Click "Debug"->"Start execution (without debugging)" or press Ctrl F5 to start running, as shown in the figure.

How to write and run C++ programs in Visual C++2010

The above is the detailed content of How to write and run C++ programs in Visual C++2010. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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