How to Run C++ in Visual Studio Code on Windows 11 2022 Best Code Editor

Поделиться
HTML-код
  • Опубликовано: 23 июл 2024
  • Run C++ program in visual studio code on windows 11 operating system
    Hey, guys in this video I'm going to show you how you can configure visual studio code (#vscode) to run c++ programs on #Windows11 OS (operating system) and I'm also gonna show you how you can run two sample user input program on #vscode_c++
    👉 Blog Post - bit.ly/RunCppVsCodeWin11
    👉 Visual Studio Code Download Link - bit.ly/VisualStudioCode_Download
    👉 Program 1 - bit.ly/CPP_Program1
    👉 Program 2 - bit.ly/CPP_Program2
    👉 How to Enable Autosave in Visual Studio Code - bit.ly/AutoSaveVScode
    👉 Beginners C++ Programming Course - rebrand.ly/CppProgrammingCourse
    C++ Programming For Beginners - Master the C++ Language
    C++ Programming will increase career options. Become a better developer in other languages by learning C++. Pointers explained
    Time Stamp
    0:00 - Introduction
    0:38 - How to download mingw g++ compiler on windows 11
    1:53 - How to install g++ mingw compiler on windows 11
    2:25 - Setup g++ path on windows 11
    3:38 - Verify g++ version
    4:26 - How to download visual studio code on windows 11
    5:07 - How to install visual studio code on windows 11
    6:38 - How to setup visual studio code for running c++ program
    6:50- How to install C++ Intellisense, debugging and code browsing extension in visual studio code
    7:26 - How to install code runner extension in visual studio code
    8:00 - Create your first C++ program in visual studio code
    9:22 - How to run C++ program in vscode
    9:53 - Create read input C++ program in vscode
    10:50 - How to fix cannot edit in read-only editor vscode
    11:19 - Run C++ program that takes input from the user in visual studio code
    11:48 - Beginners C++ Programming Course - rebrand.ly/CppProgrammingCourse
    Also Watch :
    ❇️ How to Run C++ in Visual Studio Code on Windows 10 2021 Best IDE : • How to Run C++ in Visu...
    ❇️ How to Run Java in Visual Studio Code on Windows 10 : • How to Run JAVA in Vis...
    ❇️ How to Run Python in Visual Studio Code on Windows 10 : • How to Run Python in V...
    ❇️ How to Run Golang in Visual Studio Code on Windows 10 : • How to Run Go in Visua...
    ❇️ How to Run C# in Visual Studio Code on Windows 10 : • How to Run C# in Visua...
    ❇️ How to install JDK on Windows 10 : • How to Install Java JD...
    ★★★Best Online Programming Courses★★★
    👉 Python Programming Course ➡️ bit.ly/BeginnersPythonCourse
    👉 Java Programming Course ➡️ bit.ly/JavaProgramCourse
    👉 C Programming Course ➡️ rebrand.ly/C_Programming_Mast...
    👉 C# Programming Course ➡️ bit.ly/CsharpProgrammingCourse
    👉 C++ Programming Course ➡️ bit.ly/CplusplusCourse
    👉 JavaScript Programming Course ➡️ rebrand.ly/Javascript_Course
    👉 R Programming ➡️ bit.ly/RprogrammingCourse
    👉 PHP Programming Course ➡️ bit.ly/PHP_Programming_Course
    👉 Android Development Course ➡️ bit.ly/CompleteAndroidCourse
    👉 NodeJs Programming Course ➡️ rebrand.ly/Javascript_Course
    ‪@TechDecode‬ is dedicated to providing detailed, step-by-step tutorials on various technology topics. Whether you are a beginner or an experienced user, we have something for you!
    Our tutorials are written by experienced professionals who are passionate about technology. We take a step-by-step approach to making sure that you understand each topic fully.
    If you found this video useful please give it a thumbs up and subscribe to my channel! and If you have any questions regarding this video, please ask them in the comment section. thanks for watching! :)
    Follow Us:
    👉 Facebook: / techdecodetutorials
    👉 Instagram: / techdecodetutorials
    👉 Twitter: / decodetutorials
    👉 Linkedin: / techdecodetutorials
    👉 Pinterest: / officialtechdecode
    👉 Website : www.techdecodetutorials.com/
    DISCLOSURE: This video and description might contain affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help supports the channel and allows us to continue to make videos like this. Thank you for the support!
    [Intro Song Credit]
    Valence - Infinite [NCS Release]
    Video Link - • Valence - Infinite | F...
  • ХоббиХобби

Комментарии • 137

  • @TechDecode
    @TechDecode  2 года назад +3

    👉 Blog Post - bit.ly/RunCppVsCodeWin11
    👉 Visual Studio Code Download Link - bit.ly/VisualStudioCode_Download
    👉 Program 1 - bit.ly/CPP_Program1
    👉 Program 2 - bit.ly/CPP_Program2
    👉 How to Enable Autosave in Visual Studio Code - bit.ly/AutoSaveVScode
    👉 Beginners C++ Programming Course - rebrand.ly/CppProgrammingCourse

    • @forestlink6673
      @forestlink6673 2 месяца назад

      Mingw link isn't working anymore do u have any other link?

  • @peepsrun9378
    @peepsrun9378 Год назад +8

    3 tutorials and about 50 minutes of struggling later, I found you bro youre a lifesaver. Thanks so much!

  • @evgenypodsezertsev4494
    @evgenypodsezertsev4494 Год назад +2

    I spent my entire day yesterday trying to get C++ to work on my local machine. I tried tutorial after tutorial and finally came across yours. It FINALLY worked. Thank you so much!!!

  • @tarunkumarbehera6226
    @tarunkumarbehera6226 Год назад +3

    Dude, thaaaank youuuuuuu so very much !!! I was literally struggling with this since the last two days man and your tutorial made it so easy. Thanks again!! 😀😀

  • @andrewponder580
    @andrewponder580 Год назад +9

    Spent all day watching other videos bc I need C++ for a programming class I'm taking and thankfully found this one it helped me get it done. All the other methods I kept getting errors. Your a savior

  • @kehnrebadavia8659
    @kehnrebadavia8659 7 месяцев назад +1

    Bro I've watched so many tutorials but I always face some issues, gave up using vs code but I tried setting up my vs one last time and your video really helps me, FINALLY

  • @friedaabdo6387
    @friedaabdo6387 Год назад +8

    Thank you so much! Like a lot of other commenters, I was having a LOT of trouble downloading MinGW and tried for so long and watched and read so many tutorials. Yours by far was the best and easiest! Hope this keeps up your morale :)

    • @TechDecode
      @TechDecode  Год назад

      You're Welcome ☺️
      Thank for this comment 🙌

  • @iamusmanshabbir142
    @iamusmanshabbir142 Год назад +4

    Never seen a video ever on youtube like this. So professional man! Worked like charm in 2022 ! other methods was not working because they are old

    • @TechDecode
      @TechDecode  Год назад

      You're Welcome 😁
      Don't forget to subscribe 👍

  • @VinayakAgrawal02
    @VinayakAgrawal02 Год назад

    The First Logical Video I Found to Make C++ Work with VsCode, Thanks.

  • @sparke66
    @sparke66 Год назад +1

    After weeks of trying to figure this out, this video finally help me!! Huge kudos!
    One thing to keep in mind though, file names CANNOT have any spaces in between them, otherwise it won't work

  • @Himanshu-yb9kz
    @Himanshu-yb9kz 2 года назад +19

    This video literally helps me a-lot so this is your reward.

  • @antonium4207
    @antonium4207 Год назад

    ty, i spend 2 hours trying untill your video arrived, keep it up!

  • @livethenlearn33
    @livethenlearn33 10 месяцев назад

    A life saver with this video! Thank you so very much! Beating my head against the wall for a hot minute.

  • @user-gv5mt2lq1u
    @user-gv5mt2lq1u Год назад

    Whoever you are, you are amazing!!! This was SO helpful!!!! Thank you so much!

  • @hoissuru
    @hoissuru Год назад

    Thank you! Finally a method which worked

  • @HILDA1451
    @HILDA1451 11 месяцев назад

    It works!Thank you so much!

  • @sameerjain4145
    @sameerjain4145 Год назад

    I LOVE YOU SO MUCH! Thank you so much!!!

  • @sophia_mary_r7914
    @sophia_mary_r7914 Год назад

    Thank you very much! You are a live saver !

  • @justafangirl9529
    @justafangirl9529 Год назад +6

    Ive watched 7 tutorials, this is the 8th and youre the one thats really helpful😭 Thank you so much sir. I hope youll be blessed with delicious foods everyday

    • @TechDecode
      @TechDecode  Год назад

      You are welcome 😁
      Thank you for the blessing 😊

  • @Metrax2114aw
    @Metrax2114aw Год назад

    thank you sir, i really needed this, was really helpful

  • @mikemeetstec
    @mikemeetstec Год назад

    This video worked for me. Thank you.

  • @piyushsoni7588
    @piyushsoni7588 Год назад +1

    loved it buddy i am too worried for it last two days but u made it...

  • @paulpeter8220
    @paulpeter8220 2 года назад

    finally, a C++ mingw download that worked - thank you

  • @Rubixmagic314
    @Rubixmagic314 10 месяцев назад

    Very helpful. Thank you so much!

  • @njr10edz
    @njr10edz 10 месяцев назад

    Thank you so much !

  • @mr.darkheart2979
    @mr.darkheart2979 9 месяцев назад

    very helpful video, thank you

  • @omgoti3155
    @omgoti3155 8 месяцев назад +1

    Finally found the solution. Thanks bro... Love you🙏💝

  • @lilishipper174
    @lilishipper174 Год назад

    Thank you for your help!

  • @chiteez_____1562
    @chiteez_____1562 10 месяцев назад

    Thank you so much brother. You are a absolute life saver. 😃😃

  • @Prathams1
    @Prathams1 2 года назад +4

    I was struggling for an hour!! Thank you so much
    You made it so easy.

    • @TechDecode
      @TechDecode  2 года назад

      You're Welcome 😁
      Don't forget to subscribe 👍

  • @sanjayswamy8606
    @sanjayswamy8606 Год назад +1

    I wasted my day by seeing other's youtube channels, by seeing your's channel within 1/2 an hour only downloaded the software. your channel was very helpful to me. Thank you very much

  • @zalgamedev
    @zalgamedev Год назад

    Hi @Tech Decode Tutorials, i get the following error when attempting to run the first test code: *"cl.exe build and debug is only usable when VS Code is run from the Developer Command Prompt for VS."*

  • @adityamore5656
    @adityamore5656 Год назад

    thank you so much its very helpfull to download n run pgm

  • @Himanshu-yb9kz
    @Himanshu-yb9kz 2 года назад +1

    THANK YOU SO MUCH MAN , I WAS STUCK!!!!!!!! THANK YOU THANK YOU 😍😍

  • @vincenguyen1186
    @vincenguyen1186 10 месяцев назад

    Hi! Thank you for the video! Just one question, how did you get that run timer in the terminal? Mine works fine but does not show how long it takes to run the code :(

  • @MotivizeMe-cn9rc
    @MotivizeMe-cn9rc Год назад

    This video is very helpful thank you so much 😘😘😘

  • @priyanshu7946
    @priyanshu7946 Год назад

    Thanks for your video ❤️

  • @iliasp4275
    @iliasp4275 Год назад

    love you

  • @khizirstudio
    @khizirstudio Год назад

    after wasting tons of time, I found you. Keep up the good work.

  • @mahibkhan2971
    @mahibkhan2971 Год назад

    informative and working video. thanks brother

  • @shrutimalakar8802
    @shrutimalakar8802 2 года назад +2

    Thank you sir...after watching 10 videos ..I find this and set up finally done😌

    • @TechDecode
      @TechDecode  2 года назад +1

      You're Welcome 😇
      Don't forget to subscribe 👍

  • @guy27383
    @guy27383 Год назад

    THANK YOU SO MUCH!!!!!!!!!

  • @oliverniga3853
    @oliverniga3853 Год назад +2

    absolute life saver

  • @lighthouse8563
    @lighthouse8563 Год назад

    Thanks bro its really helpful video and a very satisfied way of installing and setting up all things properly.......
    I have a request please make a video of visual studio adding break points thank you

  • @Mini_Flutter
    @Mini_Flutter 10 месяцев назад

    nice explanation every one should watch this video

  • @Chrisymcmb
    @Chrisymcmb Год назад

    Thanks!

  • @tigeroats913
    @tigeroats913 Год назад

    when i edit the path i dont get the window you get im on windows 11 22h2 i just get the name which is path and the driectory but i can only replace it not add a new one

  • @David-qz6yj
    @David-qz6yj Год назад

    So I'm using git bash as a default and everytime I run the code, it outputs "bash: cd: too many arguments". any solutions?

  • @ganinitianelectricalkkr9686
    @ganinitianelectricalkkr9686 2 года назад +1

    Your video is very helpful sir.

  • @salmaabo-zaid3604
    @salmaabo-zaid3604 Год назад

    Thank you so much.

  • @sparshshyamsrivastava7375
    @sparshshyamsrivastava7375 Год назад

    JOD !!

  • @mobildisko579
    @mobildisko579 Год назад

    this is amazing god bless you

  • @lithawasalittlegirl4778
    @lithawasalittlegirl4778 Год назад

    hi sir i have a problem. so i installed visual studio yesterday and when i opened it today it appeared back again as the 5:33 so i had to checklist those again. and it keeps happening every time i open the app. is it normal? or is there something wrong with mine? thanks in advice

  • @matteoicy64
    @matteoicy64 Год назад

    hi, i have an issue when trying to run the code. i get an error on the #include line saying that it can't find the iostream library

  • @jocobbrody1533
    @jocobbrody1533 2 года назад +1

    Thank you so much this finally solved my problem.

    • @TechDecode
      @TechDecode  2 года назад

      You're Welcome 😇
      👉 Don't forget to check Beginners C++ Programming Course - rebrand.ly/CppProgrammingCourse

  • @vijaykrishna.g4919
    @vijaykrishna.g4919 Год назад

    if we download the mingw this way ,did it will work on eclips ide

  • @lawpchale1036
    @lawpchale1036 10 месяцев назад +1

    sir, my code is still running. for about 10mins now
    still haven't seen the "subscribe now"
    what do i do??

  • @mdasifmunshe
    @mdasifmunshe Год назад +1

    Thank You

  • @Tharun-wk6rj
    @Tharun-wk6rj 9 месяцев назад

    Sir an error
    cannot open source file "iostream". Please run the 'Select IntelliSense Configuration...' command to locate your system headers.C/C++(1696)

  • @mudabirkowsar8199
    @mudabirkowsar8199 Год назад

    thanku soo much ❤❤❤❤

  • @chetnasingh5404
    @chetnasingh5404 2 года назад +1

    Best tech channel in RUclips!!! Thank you so much 👍👍

  • @renzcamelon8623
    @renzcamelon8623 Год назад

    bro i got " undefined reference to `WinMain'
    collect2.exe: error: ld returned 1 exit status. " on your second code

  • @rhosweltrinidad2647
    @rhosweltrinidad2647 Год назад

    This is so great and really a savior, but there's something wrong about mine, when I retype what u type which is the basic programming of hello world when I run it there is a fatal error, help me pls

  • @DARKNESS-rm2pp
    @DARKNESS-rm2pp Год назад

    Thank you

  • @aarondelarosa3146
    @aarondelarosa3146 Год назад

    There's a problem. I can't install MinGW64 on Windows 11. I can't find Environment Variable and " Edit the system environment variables". I can't add G++ path on windows 11.

  • @Isak7959
    @Isak7959 Год назад

    thanks!

  • @ParsaSeidi
    @ParsaSeidi Год назад

    Amazing 🔥🔥🔥

  • @BaffledMans
    @BaffledMans Год назад

    Mine says g++ is not recognized as an internal or external command. How do I fix this?

  • @RisabhGhosh2-yz7mj
    @RisabhGhosh2-yz7mj 9 месяцев назад

    reallyy good video

  • @adilgupta1872
    @adilgupta1872 Год назад

    Thanks

  • @Abhixeditz
    @Abhixeditz Год назад

    thanks sir🙏

  • @xianfier6982
    @xianfier6982 Год назад

    dude, do you know how to run custom header files in vs code?

  • @KennerMarqueti
    @KennerMarqueti Год назад

    I'm having problems compiling software with multiple .cpp and .hpp, anyone having the same issue?

  • @mshzreh
    @mshzreh Год назад

    Hello, wanted to ask you how to solve my problem because I had followed your steps and yet when i tried to run the code nothing happened. Does anyone know how to solve it?

  • @brknvods
    @brknvods Год назад

    everything installed fine, but when I run the "subscribe now" code, it throws this error: "The terminal process failed to launch: Path to shell executable "c:\C++ Files\g++" does not exist. "

  • @ManuelGarcia-gq6lx
    @ManuelGarcia-gq6lx Год назад

    Thanks for your help, you help me a lot :)

  • @sandeepsaini4850
    @sandeepsaini4850 Год назад

    can I use it for window 10 c language

  • @1028_sheng
    @1028_sheng Год назад

    Why my terminal can't run the code.It keeps showing :$ cd "c:\Users\Sheng\Desktop\cpp\projects\" && g++ a.cpp -o a && "c:\Users\Sheng\Desktop\cpp\projects\"a
    bash: cd: c:\Users\Sheng\Desktop\cpp\projects" && g++ a.cpp -o a && c:UsersShengDesktopcppprojects"a: No such file or directory

  • @qahramonaminov1723
    @qahramonaminov1723 Год назад +1

    God bless you, thank you

  • @nrk_omega7754
    @nrk_omega7754 10 месяцев назад

    you legend

  • @jacobjaime852
    @jacobjaime852 Год назад

    hello. I saw this video and many others but i seem to not get the thing going right. I installed everything exactly like you did step by step but errors keep happening. I tested that the compiler works by doing the command prompt and it seem to be working. so then i installed the VS code liek you did, adn it was successful too. I was relieved b ut when you placed your subcribe program, the texts came up different in the terminal. It still showed the subcribe us text but not like in the video. I thoought ok, doesn't matter much right? so thewn i copy and paste your second program, the imput program, and do excatly as you do. I checked the run in terminal box, and then ran the program, but it unfortunately does ask for my imput. it just displays the questions on the terminal. i dont know what it is i've done wrong and im running out of patience and ideas. can you please help me?

    • @TechDecode
      @TechDecode  Год назад

      Restart your computer and try again.
      Don't forget to save your program before running the code.

    • @jacobjaime852
      @jacobjaime852 Год назад

      @@TechDecode just restarted it, same thing. Is there anything that could be a plausible cause for this?

    • @amanvyas3546
      @amanvyas3546 Год назад

      Bro same problem have you got the solution please help me

  • @fayizhalim3145
    @fayizhalim3145 Год назад +1

    Can you help me sir. I got error it said g++ is not recognized as an internal or external command, operable program or batch file. But when i checked my compiler on cmd it works

  • @rioxcnl7898
    @rioxcnl7898 6 месяцев назад

    Its always showing error in #include

  • @nkafujulianaatabong2672
    @nkafujulianaatabong2672 Год назад +1

    Great Content

  • @hoorulainazeem3638
    @hoorulainazeem3638 Год назад

    'g++' is not recognized as an internal or external command,
    operable program or batch file.
    please anyone fix this issue

    • @TechDecode
      @TechDecode  Год назад

      Restart your computer and try again

  • @riya5935
    @riya5935 Год назад +1

    best tutorial so far! check it out! you won't be disappointed

  • @joeyestrada9071
    @joeyestrada9071 Год назад

    Why isn't mine running? :(

  • @mehedihasanshuvo4490
    @mehedihasanshuvo4490 Год назад

    ♥♥♥

  • @monstercoder3665
    @monstercoder3665 Год назад +1

    Hey bro
    my output is taking a bit longer time about 10 seconds...
    😭😭😭
    may i know why??? pls reply

  • @user-ry4ip9ps9x
    @user-ry4ip9ps9x 2 года назад +3

    Can you please teach how to invert binary tree in python please 😄

  • @arroxelx3980
    @arroxelx3980 Год назад

    Bro vs code did not running and said
    "this file is not displayed in the editor because it is either binary or uses an unexpected encoding" What should I do?

    • @TechDecode
      @TechDecode  Год назад

      Did you try the example program provided in the tutorial?

    • @arroxelx3980
      @arroxelx3980 Год назад

      @@TechDecode yep terminal not working and when I try to open the exe file it's said this file is not displayed in the editor because it is either binary or uses an unexpected encoding

    • @TechDecode
      @TechDecode  Год назад

      Restart your computer and try again from the start as instructed in the video. Do not skip any step this time.
      You might need to reinstall vscode also.

  • @radiobeatle862
    @radiobeatle862 Год назад

    It runs in the output but not in the terminal

  • @void9886
    @void9886 Год назад

    what is compiler for? is it important?

    • @TechDecode
      @TechDecode  Год назад

      Yes, it is necessary to have a compiler to run c++ programs.

  • @earledulan1674
    @earledulan1674 Год назад

    I love you man

  • @Ayushbusiness108
    @Ayushbusiness108 8 месяцев назад +1

    something is wrong because its taking about 17 seconds to compile a simple program like Hello world!!

  • @aarondelarosa3146
    @aarondelarosa3146 Год назад

    Problem solved. I made a mistake. There's another question. Can I run python and C++ codes simultaneosly on Visual Studio Code?

  • @kalidasp9378
    @kalidasp9378 2 года назад

    "'g++' is not recognized as an internal or external command,
    operable program or batch file." Error coming

    • @TechDecode
      @TechDecode  2 года назад

      Restart your computer and try again

  • @SRIDHARA-ur5fb
    @SRIDHARA-ur5fb Год назад

    Broooooovvvvvvvv maaaaaaaaasssssyaaaaah nee😖

  • @aland3485
    @aland3485 Год назад

    ≋p≋r≋o≋m≋o≋s≋m 😕

  • @1rex_aep
    @1rex_aep Год назад

    help this error is coming!
    C:\MinGW\bin\cpp.exe -fdiagnostics-color=always -g C:\Users\akann\Downloads\MicrosoftWindows.Client.CBS_cw5n1h2txyewy!InputApp\main.cpp -o C:\Users\akann\Downloads\MicrosoftWindows.Client.CBS_cw5n1h2txyewy!InputApp\main.exe
    spawn C:\WINDOWS\system32\cmd.exe ENOENTBuild finished with error(s).
    * The terminal process failed to launch (exit code: -1).
    * Terminal will be reused by tasks, press any key to close it.
    * Executing task: C/C++: cpp.exe build active file
    Starting build...
    C:\MinGW\bin\cpp.exe -fdiagnostics-color=always -g C:\Users\akann\Downloads\MicrosoftWindows.Client.CBS_cw5n1h2txyewy!InputApp\main.cpp -o C:\Users\akann\Downloads\MicrosoftWindows.Client.CBS_cw5n1h2txyewy!InputApp\main.exe
    spawn C:\WINDOWS\system32\cmd.exe ENOENTBuild finished with error(s).
    * The terminal process failed to launch (exit code: -1).
    * Terminal will be reused by tasks, press any key to close it.