Install C and C++ support in Visual Studio
If you haven’t downloaded and installed Visual Studio and the Microsoft C/C++ tools yet, here’s how to get started.
Visual Studio 2022 Installation
Welcome to Visual Studio 2022! In this version, it’s easy to choose and install just the features you need. And because of its reduced minimum footprint, it installs quickly and with less system impact.
This topic applies to installation of Visual Studio on Windows. Visual Studio Code is a lightweight, cross-platform development environment that runs on Windows, Mac, and Linux systems. The Microsoft C/C++ for Visual Studio Code extension supports IntelliSense, debugging, code formatting, auto-completion. Visual Studio for Mac doesn’t support Microsoft C++, but does support .NET languages and cross-platform development. For installation instructions, see Install Visual Studio for Mac.
Want to know more about what else is new in this version? See the Visual Studio release notes.
Ready to install? We walk you through it, step-by-step.
Step 1 — Make sure your computer is ready for Visual Studio
Before you begin installing Visual Studio:
- Check the system requirements. These requirements help you know whether your computer supports Visual Studio 2022.
- Apply the latest Windows updates. These updates ensure that your computer has both the latest security updates and the required system components for Visual Studio.
- Reboot. The reboot ensures that any pending installs or updates don’t hinder the Visual Studio install.
- Free up space. Remove unneeded files and applications from your %SystemDrive% by, for example, running the Disk Cleanup app.
For questions about running previous versions of Visual Studio side by side with Visual Studio 2022, see the Visual Studio 2022 Platform Targeting and Compatibility page.
Step 2 — Download Visual Studio
Next, download the Visual Studio bootstrapper file. To do so, choose the following button to go to the Visual Studio download page. Select the edition of Visual Studio that you want and choose the Free trial or Free download button.
Step 3 — Install the Visual Studio installer
Run the bootstrapper file you downloaded to install the Visual Studio Installer. This new lightweight installer includes everything you need to both install and customize Visual Studio.
- From your Downloads folder, double-click the bootstrapper that matches or is similar to one of the following files:
- vs_community.exe for Visual Studio Community
- vs_professional.exe for Visual Studio Professional
- vs_enterprise.exe for Visual Studio Enterprise
If you receive a User Account Control notice, choose Yes to allow the bootstrapper to run.
Step 4 — Choose workloads
After the installer is installed, you can use it to customize your installation by selecting the workloads, or feature sets, that you want. Here’s how.
- Find the workload you want in the Installing Visual Studio screen. For core C and C++ support, choose the «Desktop development with C++» workload. It comes with the default core editor, which includes basic code editing support for over 20 languages, the ability to open and edit code from any folder without requiring a project, and integrated source code control. Other workloads support more kinds of development. For example, choose the «Universal Windows Platform development» workload to create apps that use the Windows Runtime for the Microsoft Store. Choose «Game development with C++» to create games that use DirectX, Unreal, and Cocos2d. Choose «Linux development with C++» to target Linux platforms, including IoT development. The Installation details pane lists the included and optional components installed by each workload. You can select or deselect optional components in this list. For example, to support development by using the Visual Studio 2017 or 2015 compiler toolsets, choose the MSVC v141 or MSVC v140 optional components. You can add support for MFC, the experimental Modules language extension, IncrediBuild, and more.
- After you choose the workload(s) and optional components you want, choose Install. Next, status screens appear that show the progress of your Visual Studio installation.
At any time after installation, you can install workloads or components that you didn’t install initially. If you have Visual Studio open, go to Tools > Get Tools and Features. which opens the Visual Studio Installer. Or, open Visual Studio Installer from the Start menu. From there, you can choose the workloads or components that you wish to install. Then, choose Modify.
Step 5 — Choose individual components (Optional)
If you don’t want to use the Workloads feature to customize your Visual Studio installation, or you want to add more components than a workload installs, you can do so by installing or adding individual components from the Individual components tab. Choose what you want, and then follow the prompts.
Step 6 — Install language packs (Optional)
By default, the installer program tries to match the language of the operating system when it runs for the first time. To install Visual Studio in a language of your choosing, choose the Language packs tab from the Visual Studio Installer, and then follow the prompts.
Change the installer language from the command line
Another way that you can change the default language is by running the installer from the command line. For example, you can force the installer to run in English by using the following command: vs_installer.exe —locale en-US . The installer will remember this setting when it’s run the next time. The installer supports the following language tokens: zh-cn, zh-tw, cs-cz, en-us, es-es, fr-fr, de-de, it-it, ja-jp, ko-kr, pl-pl, pt-br, ru-ru, and tr-tr.
Step 7 — Change the installation location (Optional)
You can reduce the installation footprint of Visual Studio on your system drive. You can choose to move the download cache, shared components, SDKs, and tools to different drives, and keep Visual Studio on the drive that runs it the fastest.
You can select a different drive only when you first install Visual Studio. If you’ve already installed it and want to change drives, you must uninstall Visual Studio and then reinstall it.
Step 8 — Start developing
- After Visual Studio installation is complete, choose the Launch button to get started developing with Visual Studio.
- On the start window, choose Create a new project.
- In the search box, enter the type of app you want to create to see a list of available templates. The list of templates depends on the workload(s) that you chose during installation. To see different templates, choose different workloads. You can also filter your search for a specific programming language by using the Language drop-down list. You can filter by using the Platform list and the Project type list, too.
- Visual Studio opens your new project, and you’re ready to code!
Visual Studio 2019 Installation
Welcome to Visual Studio 2019! In this version, it’s easy to choose and install just the features you need. And because of its reduced minimum footprint, it installs quickly and with less system impact.
This topic applies to installation of Visual Studio on Windows. Visual Studio Code is a lightweight, cross-platform development environment that runs on Windows, Mac, and Linux systems. The Microsoft C/C++ for Visual Studio Code extension supports IntelliSense, debugging, code formatting, auto-completion. Visual Studio for Mac doesn’t support Microsoft C++, but does support .NET languages and cross-platform development. For installation instructions, see Install Visual Studio for Mac.
Want to know more about what else is new in this version? See the Visual Studio release notes.
Ready to install? We walk you through it, step-by-step.
Step 1 — Make sure your computer is ready for Visual Studio
Before you begin installing Visual Studio:
- Check the system requirements. These requirements help you know whether your computer supports Visual Studio 2019.
- Apply the latest Windows updates. These updates ensure that your computer has both the latest security updates and the required system components for Visual Studio.
- Reboot. The reboot ensures that any pending installs or updates don’t hinder the Visual Studio install.
- Free up space. Remove unneeded files and applications from your %SystemDrive% by, for example, running the Disk Cleanup app.
For questions about running previous versions of Visual Studio side by side with Visual Studio 2019, see the Visual Studio 2019 Platform Targeting and Compatibility page.
Step 2 — Download Visual Studio
Next, download the Visual Studio bootstrapper file. To do so, choose the following button to go to the Visual Studio download page. Choose the Download button, then you can select the edition of Visual Studio that you want.
Step 3 — Install the Visual Studio installer
Run the bootstrapper file you downloaded to install the Visual Studio Installer. This new lightweight installer includes everything you need to both install and customize Visual Studio.
- From your Downloads folder, double-click the bootstrapper that matches or is similar to one of the following files:
- vs_community.exe for Visual Studio Community
- vs_professional.exe for Visual Studio Professional
- vs_enterprise.exe for Visual Studio Enterprise
If you receive a User Account Control notice, choose Yes to allow the bootstrapper to run.
Step 4 — Choose workloads
After the installer is installed, you can use it to customize your installation by selecting the workloads, or feature sets, that you want. Here’s how.

- Find the workload you want in the Installing Visual Studio screen. For core C and C++ support, choose the «Desktop development with C++» workload. It comes with the default core editor, which includes basic code editing support for over 20 languages, the ability to open and edit code from any folder without requiring a project, and integrated source code control. Other workloads support more kinds of development. For example, choose the «Universal Windows Platform development» workload to create apps that use the Windows Runtime for the Microsoft Store. Choose «Game development with C++» to create games that use DirectX, Unreal, and Cocos2d. Choose «Linux development with C++» to target Linux platforms, including IoT development. The Installation details pane lists the included and optional components installed by each workload. You can select or deselect optional components in this list. For example, to support development by using the Visual Studio 2017 or 2015 compiler toolsets, choose the MSVC v141 or MSVC v140 optional components. You can add support for MFC, the experimental Modules language extension, IncrediBuild, and more.
- After you choose the workload(s) and optional components you want, choose Install. Next, status screens appear that show the progress of your Visual Studio installation.
At any time after installation, you can install workloads or components that you didn’t install initially. If you have Visual Studio open, go to Tools > Get Tools and Features. which opens the Visual Studio Installer. Or, open Visual Studio Installer from the Start menu. From there, you can choose the workloads or components that you wish to install. Then, choose Modify.
Step 5 — Choose individual components (Optional)
If you don’t want to use the Workloads feature to customize your Visual Studio installation, or you want to add more components than a workload installs, you can do so by installing or adding individual components from the Individual components tab. Choose what you want, and then follow the prompts.

Step 6 — Install language packs (Optional)
By default, the installer program tries to match the language of the operating system when it runs for the first time. To install Visual Studio in a language of your choosing, choose the Language packs tab from the Visual Studio Installer, and then follow the prompts.

Change the installer language from the command line
Another way that you can change the default language is by running the installer from the command line. For example, you can force the installer to run in English by using the following command: vs_installer.exe —locale en-US . The installer will remember this setting when it’s run the next time. The installer supports the following language tokens: zh-cn, zh-tw, cs-cz, en-us, es-es, fr-fr, de-de, it-it, ja-jp, ko-kr, pl-pl, pt-br, ru-ru, and tr-tr.
Step 7 — Change the installation location (Optional)
You can reduce the installation footprint of Visual Studio on your system drive. You can choose to move the download cache, shared components, SDKs, and tools to different drives, and keep Visual Studio on the drive that runs it the fastest.

You can select a different drive only when you first install Visual Studio. If you’ve already installed it and want to change drives, you must uninstall Visual Studio and then reinstall it.
Step 8 — Start developing
- After Visual Studio installation is complete, choose the Launch button to get started developing with Visual Studio.
- On the start window, choose Create a new project.
- In the search box, enter the type of app you want to create to see a list of available templates. The list of templates depends on the workload(s) that you chose during installation. To see different templates, choose different workloads. You can also filter your search for a specific programming language by using the Language drop-down list. You can filter by using the Platform list and the Project type list, too.
- Visual Studio opens your new project, and you’re ready to code!
Visual Studio 2017 Installation
In Visual Studio 2017, it’s easy to choose and install just the features you need. And because of its reduced minimum footprint, it installs quickly and with less system impact.
Prerequisites
- A broadband internet connection. The Visual Studio installer can download several gigabytes of data.
- A computer that runs Microsoft Windows 7 or later versions. We recommend the latest version of Windows for the best development experience. Make sure that the latest updates are applied to your system before you install Visual Studio.
- Enough free disk space. Visual Studio requires at least 7 GB of disk space, and can take 50 GB or more if many common options are installed. We recommend you install it on your C: drive.
For details on the disk space and operating system requirements, see Visual Studio Product Family System Requirements. The installer reports how much disk space is required for the options you select.
Download and install
- To download the latest Visual Studio 2017 installer for Windows, go to the Microsoft Visual Studio Older downloads page. Expand the 2017 section, and choose the Download button.
Tip The Community edition is for individual developers, classroom learning, academic research, and open source development. For other uses, install Visual Studio 2017 Professional or Visual Studio 2017 Enterprise.
For C and C++, select the Desktop development with C++ workload and then choose Install.
If it’s highlighted, select it to open the Notifications window. If there are any updates available for Visual Studio, we recommend you install them now. Once the installation is complete, restart Visual Studio.Visual Studio 2015 Installation
To install Visual Studio 2015, go to the Microsoft Visual Studio Older downloads page. Expand the 2015 section, and choose the Download button. Run the downloaded setup program and choose Custom installation and then choose the C++ component. To add C and C++ support to an existing Visual Studio 2015 installation, click on the Windows Start button and type Add Remove Programs. Open the program from the results list and then find your Visual Studio 2015 installation in the list of installed programs. Double-click it, then choose Modify and select the Visual C++ components to install.
In general, we highly recommend that you use the latest version of Visual Studio even if you need to compile your code using the Visual Studio 2015 compiler. For more information, see Use native multi-targeting in Visual Studio to build old projects.
When Visual Studio is running, you’re ready to continue to the next step.
Как настроить компилятор C ++ в Windows?
System Modeler требует доступа к компилятору C ++ для запуска моделирования. В Windows System Modeler поддерживает компиляторы C ++, которые являются частью версий Microsoft Visual Studio 2013, 2015, 2017 (рекомендуется) и 2019.
Если компилятор C ++ уже установлен
- Запустите System Modeler. System Modeler автоматически обнаружит компилятор C ++ и установит его в качестве компилятора по умолчанию.
- Убедитесь, что установка компилятора прошла успешно.
В случае сообщений об ошибках попробуйте настроить компилятор вручную.
Если компилятор C ++ еще не установлен
- Запустите System Modeler. Появится диалоговое окно с предложением загрузить один из поддерживаемых компиляторов:

- Нажмите кнопку «Check Online». Появится «Install Compiler», окно установки компилятора.

- Мы рекомендуем выбрать Visual C++ Build Tools 2017. Нажмите OK, чтобы подтвердить свой выбор. Выбранная версия Visual Studio начнет загрузку.
- Следуйте инструкциям по установке выбранных инструментов.
- После завершения установки Visual Studio перезапустите System Modeler. System Modeler автоматически обнаружит компилятор C++ и установит его в качестве компилятора по умолчанию.
- Убедитесь, что установка компилятора прошла успешно.
В случае сообщений об ошибках попробуйте настроить компилятор вручную.
В качестве альтернативы, вы можете вручную загрузить и установить бесплатные версии Visual Studio по следующим ссылкам:
- Microsoft Visual Studio Community 2019 for Windows Desktop
- Microsoft Visual Studio Community 2017 for Windows Desktop (рекомендуется)
- Microsoft Visual Studio Express 2015 for Windows Desktop
- Microsoft Visual Studio Express 2013 for Windows Desktop
Как установить c на visual studio
stdfloat → Is CF enough for IZHO, IOI?
molney → Разбор Codeforces Round 909 (Div. 3)
![]()
reporting_cheaters → Reporting cheaters and more
n0sk1ll → Codeforces Round #910 (Div. 2)
Sacchidananda → You are the limitless
Loserinlife → Singularity Cup P4 — Staircase Sum
Phuccc → Do I need to learn Fenwick Tree when I already know how to use Segment Tree?
_rashed_ → TLE on system testing but got AC after resubmitting the exact same code isn’t it concerning.
zwezdinv → Codeforces Round #909 (Div. 3)
Md_Masaud_Hasan → Suggestions for newcomers.
awoo → Разбор Educational Codeforces Round 146
Rahat_Khan_Pathan → Solve UVa 11235 — Frequent values using Segment Tree
atcoder_official → Sky Inc, Programming Contest 2023 (AtCoder Beginner Contest 329) Announcement
MohammadParsaElahimanesh → Be 8 times faster with radix sort!
T LE → Finally, semantic search for competitive programming problems
xiaocaoren1998 → Come here and have fun!
chuka231 → [Feature Request] Out of contest registration
![]()
awoo → Разбор Educational Codeforces Round 126
imachug → FFT is less precise than you think
gauravgsmp → Doubt in Stamping the sequence problem
purp4ever → Teams Qualified for Africa and Arab Collegiate Programming Championship — ACPC 2023 (+teens)
ICPCNews → ICPC 2023 Online Challenge powered by Huawei
![]()
prayutsu → CfLockout — Practice Codeforces Problems with Friends in a Competitive Way
![]()
Vladosiya → Codeforces Round #826 (Div. 3) Разбор
aman.acid.118ml → Help needed in Macro Compilation
Блог пользователя zholnin
Установка C++ под Windows — многочасовые мучения
Автор zholnin, 10 лет назад ,
Вчера и сегодня пытался установить C++ под Windows. Попробовал три пакета, ни в одном не удалось добиться того, что мне нужно. Нужно мне совсем немного — Win32 Console Application, возможность подсовывать файл в stdin, и чтобы всё работало без проблем.
Eclipse Начал с Eclipse, так как пользую её для Python. Нашёл некий СDT C++ для Eclipse, установил. Компилятор в пакет не входил — начал искать компилятор. Вспомнил, что когда-то давно устанавливал Visual Studio — но не смог найти его у себя на диске. Почитал про GCC — не захотелось сразу заморачиваться с установкой MinGW, поэтому следующим пунктом стала установка Visual Studio Express.
Visual Studio Express Установил, выбираю новый проект -> C++. Вылезает список шаблонов. Вижу незнакомое слово XAML и кучу шаблонов про Windows Phone, Windows Tile Application и прочие навороты. Набираю в поиске Win32 Console Application — не найдено. Там есть ссылка на «магазин шаблонов» — захожу туда, опять ищу Win32 Console app — никакого эффекта. Попробовал один из имеющихся шаблонов — объём кода после нажатия ОК сразу превысил что-либо, что я когда-то писал на C++. Испугался.
Попытлся прикрутить микрософтовский компилятор к Eclipse — не получилось. Прочитал про Codeblocks — написано типа устанавливаешь и всё сразу работает, плюс в пакет включён компилятор.
Eclipse Eclipse сам увидел что у меня появился GCC и сам его подключил — меня это порадовало. Попробовал тестовую программу — не найден iostream. Хорошо. Нашёл все заголовочные файлы, прописал в Header paths для компилятора. Ошибка с include исчезла — вроде бы всё видит. Осталась ошибка — и при компиляции она тоже вылезает — undefined function fprint. Мучился долго, пытаясь научить Eclipse этой стандартной функции, но ничего не получилось — уже всё, что относится к C++, все пути где мог прописал, а ошибка никуда не девается.
Что имею в остатке (после где-то пяти часов):
- Eclipse, который не признаёт fprint
- Codeblocks, который работает, но отказывается передавать файлы в stdin
- Microsoft Visual C++ Express, которые не понимает, зачем нужен Win32 Console и хочет чтобы я уже написал что-нибудь для Windows Phone.
Вопрос — может ли кто-нибудь что-нибудь порекомендовать? Я уже начинаю думать, что может быть забить на C++ и тренировать Java — она у меня с самого начала прекрасно работала в Eclipse. Второй вопрос — скажите мне, это я такой тупой, или что-то не то хочу от своего компьютера?
Да — я писал на C++ в 1997-2000 годах, с тех пор «в руки» не брал, потом был период PHP. В 2009-2010 игрался с Objective C++, потом изучал Java, но ничего большого на Java не написал. С 2012 года на Python — но в соревнованиях, где тайм лимит устанавливает в 1 секунд с Python трудно. Поэтому пытаюсь выбрать, к чему мне вернулся — к C++ или Java.

codeblocks, eclipse, visual studio
Настройка редактора VS Code для работы с компилятором MSVC, часть 1
Окружение: операционная система «Windows 10», текстовый редактор (редактор кода) «Visual Studio Code» («VS Code») версии 1.77.1 (самая свежая на сегодня, от 5 апреля), «Microsoft C++ Build Tools» (для работы с инструментами среды «Visual Studio 2022» без IDE, из командной строки).
Вообще, описание настройки есть на английском языке в интернете. Кому интересно, можно сразу перейти в следующую статью: «Configure VS Code for Microsoft C++» (по-русски «Настройка редактора VS Code для работы с компилятором Microsoft C++»). Я не собираюсь в этом посте делать полный перевод указанной статьи, просто коротко перескажу своими словами и со своими соображениями, так как в оригинале, как мне кажется, всё излагается довольно путано.
Устройство документации редактора «VS Code»
Указанная статья входит в состав документации редактора «VS Code», которая доступна на сайте code.visualstudio.com. В этой документации работе с языком программирования C++ посвящены отдельная глава из раздела «Languages» (по-русски «Языки программирования») и раздел «C++» целиком:
1) code.visualstudio.com / Docs / Languages / C++ (статья «C/C++ for Visual Studio Code»)
2) code.visualstudio.com / Docs / C++ (содержит на данный момент 14 статей, первая из которых называется «Introductory Videos for C++»)
Это замечание по устройству документации было необходимо сделать, так как документация устроена не очень удобно: отсутствуют ссылки на разделы, есть ссылки только на статьи, входящие в разделы, а информация по языку C++ есть в двух разделах документации, что совсем неочевидно.
Зачем нужна настройка редактора «VS Code»
Создавая текстовый редактор «VS Code», его разработчики ставили целью сделать как можно более компактный инструмент, с которым можно было бы совмещать сторонние инструменты, в том числе для работы из командной строки. У компании «Microsoft» уже была интегрированная среда разработки «Visual Studio», очень большая и неповоротливая. Требовался компактный небольшой инструмент для программистов, которые предпочитают работать с компактными инструментами, с командной строкой. Таким образом появился редактор «VS Code», но для сохранения компактности его оставили по умолчанию только редактором, в него не включены компиляторы и интерпретаторы для разных языков программирования.
Вместе с тем, редактор «VS Code» можно настроить так, чтобы из него можно было не только писать исходный код программ, но и производить компиляцию и/или отладку этого кода, с пошаговым выполнением отладки, с точками останова и тому подобным.
Что нужно для работы с языком C++ из редактора «VS Code»
В документации редактора «VS Code» описана настройка для разных компиляторов. Но в этом посте я рассматриваю настройку только для компилятора MSVC (Microsoft Visual C++).
Во-первых, для этого требуется, чтобы в редакторе «VS Code» было установлено расширение с идентификатором «ms-vscode.cpptools». Установить это расширение можно из окна редактора «VS Code», воспользовавшись вкладкой «Расширения» (Ctrl+Shift+X) основной боковой панели (эта панель обычно находится слева). На этой вкладке можно найти любое расширение, введя его идентификатор в строку поиска, которая расположена сверху на этой вкладке. Как только нужное расширение появится в списке, его можно установить, нажав на кнопку «Установить» под коротким описанием расширения. Если расширение уже установлено, то такой кнопки там не будет.
Независимо от того, установлено расширение или нет, всегда можно нажать на название расширения в списке расширений, тогда справа откроется новое подокно с подробным описанием расширения. Открытие подробного описания расширения не означает, что запустилась установка этого расширения. Так можно просматривать подробное описание расширений без их установки. Из этого описания, если расширение уже установлено, его можно временно отключить, либо полностью удалить, если это понадобится.
Параметры расширения можно просмотреть, открыв все доступные параметры (и редактора, и всех расширений вместе взятых) с помощью сочетания клавиш «Ctrl+,» (клавиша «Ctrl» и запятая, которая ближе к клавише пробела) и введя в строку поиска следующее: «@ext:ms-vscode.cpptools». В данном случае я просматриваю параметры установленного расширения с идентификатором «ms-vscode.cpptools»:

На иллюстрации видно, что для расширения с идентификатором «ms-vscode.cpptools» найдено 155 параметров. Заголовок «C/C++» — это название расширения. На иллюстрации видно, что параметры расширения разбиты на 7 разделов, показано количество параметров, входящих в каждый из этих разделов. Сами параметры отображаются справа, на иллюстрации видны первые из 155 найденных параметров.
Не стоит беспокоиться, ручная настройка всех этих 155 параметров не требуется, у них уже есть значения по умолчанию. Их можно оставить в том виде, в котором они есть.
Вообще, про настройку редактора и его расширений еще много чего можно рассказать, но это выходит за рамки данного поста.
Во-вторых, даже если у вас уже всё настроено, папку рабочего проекта следует открывать в редакторе «VS Code» из программы-оболочки, настроенной для работы с набором инструментов «Microsoft C++ Build Tools», включающих компилятор MSVC, об этом было подробно рассказано в одном из предыдущих постов.
Если вы откроете папку рабочего проекта любым другим способом и попытаетесь запустить сборку или отладку разрабатываемой программы, то получите сообщение об ошибке, а сборка и/или отладка не запустятся:

Начало настройки, разбор интерфейса редактора
Итак, у вас для редактора «VS Code» уже установлено расширение «C/C++» (c идентификатором «ms-vscode.cpptools»). Вы создали папку проекта, в которой поместили исходный код своей программы на языке C++ в текстовых файлах с расширением «.cpp». Вы открыли папку проекта в редакторе «VS Code» из командной строки нужной программы-оболочки:

На иллюстрации выше я показал порядок запуска редактора «VS Code», обязательный для того, чтобы сборка и отладка разрабатываемой программы сработали из редактора «VS Code».
Я создал папку «test» проекта и поместил в нее исходный код моей программы в текстовом файле «first.cpp». После этого я открыл в папке проекта специальную программу-оболочку, которая была настроена автоматически при установке набора инструментов «Microsoft C++ Build Tools» (см. отдельный пост про это) и запустил из ее командной строки команду code . (обратите внимание на пробел и точку после слова «code»).
В этой команде слово «code» означает запуск исполняемого файла «code.exe» редактора «VS Code». Полный путь к этому исполняемому файлу был автоматически прописан в переменных среды «Windows» при установке редактора «VS Code» на мой компьютер. Пробел и точка после названия исполняемого файла означают, что редактор «VS Code» при запуске должен автоматически открыть текущее местоположение в качестве папки проекта (рабочей области). То есть будет открыта папка «test» моего проекта.
Когда в редакторе «VS Code» открыта папка проекта, на вкладке «Проводник» (Ctrl+Shift+E) основной боковой панели редактора будет отображен список файлов и папок проекта. На этой вкладке я выбрал файл «first.cpp» и содержимое этого файла отобразилось в подокне справа. Если всё настроено правильно, то справа от названия подокна с исходным кодом программы отображается кнопка запуска сборки или сборки и отладки разрабатываемой программы. На иллюстрации выше я обвел эту кнопку красным маркером.
Эта кнопка имеет два режима, в которых ее внешний вид будет отличаться (с жучком, без жучка). Режим кнопки выбирается с помощью дополнительной кнопки-списка справа:

Кнопка запоминает режим, который был выбран в этом списке в последний раз, когда список режимов открывался для выбора режима. Описание режимов:
– Выполнить отладку файла C/C++ (внешний вид кнопки: с жучком, Ctrl+F5);
– Запустить файл C/C++ (внешний вид кнопки: без жучка, F5).
Первый режим выполняет сборку программы в исполняемый файл, а затем запускает полученный исполняемый файл в режиме отладки, в котором возможна пошаговая отладка и остановка на точках останова, отмеченных в исходном коде перед нажатием кнопки запуска.
Второй режим выполняет сборку программы в исполняемый файл, а затем запускает полученный исполняемый файл обычным способом, не в режиме отладки.
Создание файлов с настройками в формате JSON
Настройка кнопки запуска (ее режимов) выполняется с помощью добавления специальных текстовых файлов в формате JSON. Эти настройки могут быть разными для разных проектов. Создать эти файлы можно либо написав их вручную, либо скопировав из другого проекта, в котором эти настройки ранее уже были выполнены, либо создав эти файлы автоматически из графического интерфейса редактора «VS Code».
Для каждого проекта эти файлы хранятся внутри папки проекта в папке с названием «.vscode». Нужные два файла с настройками должны иметь названия «tasks.json» и «launch.json».
В файле «tasks.json» могут быть настроены разные задачи, выполняющиеся при запуске сборки (компиляции) разрабатываемой программы. В простейшем случае в этом файле прописывается, собственно, задача запуска сборки программы. Как было описано выше, файл «tasks.json» используется в обоих режимах работы кнопки запуска.
В файле «launch.json» хранятся настройки запуска отладки программы. Этот файл используется только в режиме «Выполнить отладку файла C/C++» кнопки запуска.
