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

  Рет қаралды 39,621

ProgrammingKnowledge

ProgrammingKnowledge

Күн бұрын

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.
Install and Use Visual Studio Code on Windows 11 (VS Code) - • Install and Use Visual...
With an updated VS Code you can do it in the following manner:
Hit (Ctrl+P) and type:
ext install cpptools
Open a folder (Ctrl+K & Ctrl+O) and create a new file inside the folder with the extension .cpp (ex: main.cpp):
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": [
"-g", "helloworld.cpp"
],
"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).
In launch.json file, edit the following line and save the file:
Below is an example using the MinGW GDB debugger:
{
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/a.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"miDebuggerPath": "C:\\mingw\\bin\\gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "build hello world"
}
]
}
Hit F5.
★★★Top Online Courses From ProgrammingKnowledge ★★★
Python Programming Course ➡️ bit.ly/2vsuMaS ⚫️ bit.ly/2GOaeQB
Java Programming Course ➡️ bit.ly/2GEfQMf ⚫️ bit.ly/2Vvjy4a
Bash Shell Scripting Course ➡️ bit.ly/2DBVF0C ⚫️ bit.ly/2UM06vF
Linux Command Line Tutorials ➡️ bit.ly/2IXuil0 ⚫️ bit.ly/2IXukt8
C Programming Course ➡️ bit.ly/2GQCiD1 ⚫️ bit.ly/2ZGN6ej
C++ Programming Course ➡️ bit.ly/2V4oEVJ ⚫️ bit.ly/2XMvqMs
PHP Programming Course ➡️ bit.ly/2XP71WH ⚫️ bit.ly/2vs3od6
Android Development Course ➡️ bit.ly/2UHih5H ⚫️ bit.ly/2IMhVci
C# Programming Course ➡️ bit.ly/2Vr7HEl ⚫️ bit.ly/2W6RXTU
JavaFx Programming Course ➡️ bit.ly/2XMvZWA ⚫️ bit.ly/2V2CoAi
NodeJs Programming Course ➡️ bit.ly/2GPg7gA ⚫️ bit.ly/2GQYTQ2
Jenkins Course For Developers and DevOps ➡️ bit.ly/2Wd4l4W ⚫️ bit.ly/2J1B1ug
Scala Programming Tutorial Course ➡️ bit.ly/2PysyA4 ⚫️ bit.ly/2PCaVj2
Bootstrap Responsive Web Design Tutorial ➡️ bit.ly/2DFQ2yC ⚫️ bit.ly/2VoJWwH
MongoDB Tutorial Course ➡️ bit.ly/2LaCJfP ⚫️ bit.ly/2WaI7Ap
QT C++ GUI Tutorial For Beginners ➡️ bit.ly/2vwqHSZ
★★★ Online Courses to learn ★★★
Get 2 FREE Months of Unlimited Classes from skillshare - skillshare.eqc...
Data Science - bit.ly/2lD9h5L | bit.ly/2lI8wIl
Machine Learning - bit.ly/2WGGQpb | bit.ly/2GghLXX
Artificial Intelligence - bit.ly/2lYqaYx | bit.ly/2NmaPya
MERN Stack E-Degree Program - bit.ly/2kx2NFe | bit.ly/2lWj4no
DevOps E-degree - bit.ly/2k1PwUQ | bit.ly/2k8Ypfy
Data Analytics with R - bit.ly/2lBKqz8 | bit.ly/2lAjos3
AWS Certification Training - bit.ly/2kmLtTu | bit.ly/2lAkQL1
Projects in Java - bit.ly/2kzn25d | bit.ly/2lBMffs
Machine Learning With TensorFlow - bit.ly/2m1z3AF | bit.ly/2lBMhnA
Angular 8 - Complete Essential Guide - bit.ly/2lYvYRP
Kotlin Android Development Masterclass - bit.ly/2GcblsI
Learn iOS Programming Building Advance Projects - bit.ly/2kyX7ue
★★★ Follow ★★★
My Website - www.codebind.com
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!

Пікірлер: 31
@Mahesh-ux5di
@Mahesh-ux5di 2 жыл бұрын
Bro on 4:04 showing the file has been downloaded incorrectly on my pc Unable to install it please help me
@mahendrakergaurav7760
@mahendrakergaurav7760 2 жыл бұрын
yes same problem
@prajwaldeshpande7984
@prajwaldeshpande7984 2 жыл бұрын
same prob
@vetrivel.r3383
@vetrivel.r3383 2 жыл бұрын
same stuff
@simulatrix
@simulatrix 2 жыл бұрын
Same prob too
@pranjalsingh6893
@pranjalsingh6893 2 жыл бұрын
@@simulatrix kzbin.info/www/bejne/fIimZpmMoJWEp6c check it out
@ompat1l
@ompat1l 2 жыл бұрын
When we start installation and then start download my device is showing the file has been downloaded incorrectly
@bt8x241
@bt8x241 2 жыл бұрын
Same
@fatimasayeedamani
@fatimasayeedamani 2 жыл бұрын
Same issue, any idea how to resolve
@GhostOpsAirsoft
@GhostOpsAirsoft 2 жыл бұрын
The fix I found was to do this: In source forge, go to files, and select the .zip of the options you need that are selected during the installation prompt. This will enable you to manually download the files instead of the installer doing it. Then you copy and paste the files in the C: directory. A little bit of google search helped me find this.
@pranjalsingh6893
@pranjalsingh6893 2 жыл бұрын
kzbin.info/www/bejne/fIimZpmMoJWEp6c check this video out you will get to know how to fix it
@sejaldahake2745
@sejaldahake2745 2 жыл бұрын
@@GhostOpsAirsoft Hey, cannot find the zip file. Could you plese share the link?
@sarves_boreddy
@sarves_boreddy 2 жыл бұрын
I received an error like this "downloaded incorrectly" while installing
@pwwolf2473
@pwwolf2473 2 жыл бұрын
Have you found the fix?
@loknadhreddy
@loknadhreddy 2 жыл бұрын
By default in mingw instead of .exe file...zip file Is getting downloaded...what to do ?
@pete2153
@pete2153 Жыл бұрын
You've probably already figured it out by now, but I'll answer the question just in case anyone else gets stuck: A lot of the time (or the majority, even), developer tooling is distributed as a compressed "archive" format. On Windows, you will typically download software that is packaged with one of the following extensions: `.zip` or `.7z`. There are others, but they are not as common. The reason software is distributed in this way is to greatly reduce the size of the file(s), making it easier for the authors to host the files themselves and to speed up the transfer of data when you download it. You may or may not have the required software to extract these types of files. To check, you can open up `explorer.exe` and navigate to where you downloaded the file to. Next, right click on it and check to see if there is an "Extract files" or something similar. If there is not, you may need to download the necessary software to handle `.zip` / `.7z` and other archive formats. Two very popular solutions are "WinRAR" and "7z". If you have something like `Chocolatey` or `Scoop` installed, you can actually install these kinds of utilities from the command line (PowerShell or cmd), but you do not have to. Do whatever you are most comfortable with. Hopefully this is helpful to someone! I've listed the links to the software that will handle `.zip` files for you below. WinRAR website (find the download button and just follow instructions): www.win-rar.com/start.html?&L=0 7z website (locate the one that matches your system): www.7-zip.org/download.html
@loknadhreddy
@loknadhreddy Жыл бұрын
@Pete Thank you Mr.Pete As u told I already downloaded it but the knowledge u provided...thanks a lot
@Shimon24
@Shimon24 2 жыл бұрын
im downloading the min-gw but its on zip fil, how can i install it normally?
@NurvnUWU
@NurvnUWU Жыл бұрын
extract it i think
@maheshdgaikwad427
@maheshdgaikwad427 2 жыл бұрын
Thank you so much🤩🤩❤️❤️
@ParasProgramming123
@ParasProgramming123 2 жыл бұрын
Have u used kite for c language??
@ifhammohamed1955
@ifhammohamed1955 2 жыл бұрын
while i'm installing mingw they popup notificatition like installing failed what am like to do?
@dawi9840
@dawi9840 2 жыл бұрын
Useful skills! Thank you :D
@viralvsongs
@viralvsongs 2 жыл бұрын
thanks buddy
@JitendraKumar-ll4lz
@JitendraKumar-ll4lz 2 жыл бұрын
Use full
@pruthviraj7349
@pruthviraj7349 2 жыл бұрын
Sir, please suggest me a website for learning ethical hacking stuff , please sir
@ompat1l
@ompat1l 2 жыл бұрын
Please help
@JitendraKumar-ll4lz
@JitendraKumar-ll4lz 2 жыл бұрын
First
C++ Tutorial - Full Course
9:58:52
ProgrammingKnowledge
Рет қаралды 5 М.
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 62 МЛН
Set Up C++ Development With Visual Studio Code on Windows 10 (VS Code)
23:36
ProgrammingKnowledge
Рет қаралды 1,1 МЛН
you will never ask about pointers again after watching this video
8:03
BEST WAY to make Desktop Applications in C++
26:00
The Cherno
Рет қаралды 943 М.
C++ Tutorial for Beginners - Learn C++ in 1 Hour
1:22:56
Programming with Mosh
Рет қаралды 4,4 МЛН
Debugging C++ Program in Visual Studio Code (VSCode)
17:23
ProgrammingKnowledge
Рет қаралды 142 М.
Visual Studio Code Extensions to Improve Your Productivity
39:11
freeCodeCamp.org
Рет қаралды 207 М.
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН