Set Up C++ Development With Visual Studio Code on Windows 11 (VS Code) |VSCode C++Development Basics

preview_player
Показать описание
In this video I am going to show, How to Set Up C++ Development With Visual Studio Code on Windows 11. We will use MinGW with VS code as our compiler and debugging tool. So First I will show How to install mingw. The we will see how to create, build and compile our first C++ Program on VScode.

With an updated VS Code you can do it in the following manner:

Hit (Ctrl+P) and type:

ext install cpptools

Type in your code and hit save.

Press (Ctrl+Shift+P and type, Configure task runner and then select other at the bottom of the list.

{
"version": "2.0.0",
"tasks": [
{
"label": "build hello world",
"type": "shell",
"command": "g++",
"args": [
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
Hit (Ctrl+Shift+B to run Build task. This will create the .obj and .exe files for the project.

For debugging the project, Hit F5 and select C++(Windows).

Below is an example using the MinGW GDB debugger:

{
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "build hello world"
}
]
}

Hit F5.

★★★Top Online Courses From ProgrammingKnowledge ★★★

★★★ Online Courses to learn ★★★

★★★ Follow ★★★

DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!
Рекомендации по теме
Комментарии
Автор

Bro on 4:04 showing the file has been downloaded incorrectly on my pc
Unable to install it please help me

Mahesh-uxdi
Автор

When we start installation and then start download my device is showing the file has been downloaded incorrectly

ompatl
Автор

I received an error like this "downloaded incorrectly" while installing

sarves_boreddy
Автор

By default in mingw instead of .exe file...zip file Is getting downloaded...what to do ?

loknadhreddy
Автор

im downloading the min-gw but its on zip fil, how can i install it normally?

Shimon
Автор

while i'm installing mingw they popup notificatition like installing failed what am like to do?

ifhammohamed
Автор

Sir, please suggest me a website for learning ethical hacking stuff, please sir

pruthviraj
welcome to shbcf.ru