2024-07-12
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
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
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
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
Run the following code
- #include<stdio.h>
- int main()
- {
- printf("Hello World!");
- return 0;
- }
Click Native Windows Debugger run
operation result