Technology Sharing

Visual Studio 2022 installation and use

2024-07-12

한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina

1. Download and installation

VS official website:Visual Studio: IDE and Code Editor for Software Developers and Teams

Download the free Community Edition

Get an .exe file

Right click to install

Select C++ development and change the installation location

Waiting for installation

Click Start

2. Use of VS

1. Create a project

Open VS and click Create New Project

Click Empty Project

Enter your own project name in Project Name; select the storage location of the project in Location (it is recommended to create a new folder for storing projects in the future) and finally click Create to complete the project creation.

It is not recommended to use Chinese characters in project names and file names.

or:File → New → Project → Empty Project

If there is no Empty Project option, it may be because "Desktop Development with C++" is not installed in the Installer.

To install, search for Visual Studio Installer → Modify and install

2. Create source files

Solution Explorer,Source File"right click Add → New Item, select the c++ file and thenStorage locationandSource file nameWhen you have completed the changes, clickAdd to, complete the source file creation.

file name

If you are not used to the resource manager on the right, you can drag it to the left

If you don't have a resource manager, you can view Found

3. Write code

Run the following code

  1. #include<stdio.h>
  2. int main()
  3. {
  4. printf("Hello World!");
  5. return 0;
  6. }

Click Native Windows Debugger run

operation result

refer to

Visual Studio 2022 installation nanny-level tutorial

Visual studio installation tutorial 2022 latest version (detailed pictures and text) installation of C language software for beginners