How to set up C++ in Visual Studio Code

Поделиться
HTML-код
  • Опубликовано: 24 ноя 2024

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

  • @theironrhino110
    @theironrhino110 9 месяцев назад +69

    Thanks a lot for the helpful guide! I know the steps are explained on the website but having someone to walk you through the process is a lot less stressful!

  • @ziprock
    @ziprock 10 месяцев назад +86

    i tried getting a compiler to work with vs code last year and couldn't figure it out and gave up. this method was super easy, straight to the point, and ive got a working compiler now thank you.

    • @shuaibakhtar5333
      @shuaibakhtar5333 6 месяцев назад +4

      brother, my compiler is still not working properly could you please help me

    • @SpeaksYourWord
      @SpeaksYourWord 4 месяца назад

      @@shuaibakhtar5333 Uninstall everything and go through harry's guide

  • @zarifshoeb
    @zarifshoeb 2 месяца назад +14

    Thank you so much. I started my first computer science class and was lost in the sauce. I didn’t know anything about what to install and how to install it. That is until I saw this video. Thanks to you I was able to print my first Hello World ! 😊

  • @andrewbauman256
    @andrewbauman256 10 месяцев назад +129

    Hey everyone if g++ or the other compilers aren't showing up at 06:08 time in the video or when you try to run the code (which is what happened to me every single time I tried this) this sounds so dumb but just make sure you did all the previous steps correct and RESTART YOUR COMPUTER. It worked for me after this. Thanks Kenny Yip Coding for the tutorial and happy coding y'all :)

    • @DavidHasanov-p7r
      @DavidHasanov-p7r 10 месяцев назад +11

      my problem right here, life saver

    • @natepotate5025
      @natepotate5025 9 месяцев назад +5

      ive been trying to fix this problem all day when all i had to do was restart my computer, thank you

    • @lionsin6067
      @lionsin6067 8 месяцев назад +2

      your a life saver, its 5:35am and im so tired of trying to get this thing to work

    • @hime-kamisama
      @hime-kamisama 8 месяцев назад +3

      You actually only need to close all VSCode windows so that the Path changes take effect.

    • @blasterchampions1801
      @blasterchampions1801 8 месяцев назад +4

      Is there an error like this
      The preLaunchTask 'C/C++:gcc.exe build active file' terminated with exit code -1 ?

  • @ericroque5813
    @ericroque5813 9 месяцев назад +7

    You dude is a hero! Let me add that the first time you run your code after you do this, there'll be a bunch of errors. Depending on how fast your computer is, it will take time before all the scripts load up and be read in your computer's system. Mine had a bunch of error at first when I ran my codes and I just restarted my laptop and it eventually worked.

  • @Dulkage
    @Dulkage Год назад +53

    The only tutorial that actually worked for me! Thank you!!

    • @thabomaleke874
      @thabomaleke874 6 месяцев назад +1

      The other ones 😞. They are really useless

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

      @@thabomaleke874 Yea

  • @alexwade9888
    @alexwade9888 10 месяцев назад +72

    The only video I could find that actually explained this clearly. Subscribed just off the quality of this video alone. As soon as I have hello worlded I'll be back to see what else you've got.

    • @gabrielapinheiro7643
      @gabrielapinheiro7643 8 месяцев назад +2

      same here! all possibilities ! really well explained, well done man!!!

  • @fardinkhandaker3436
    @fardinkhandaker3436 8 месяцев назад +15

    I've been looking for a video like this. I always struggle to compile but now, it's not a problem. Thank you!

  • @Amy_k7
    @Amy_k7 9 месяцев назад +5

    As someone who is a complete beginner, THIS IS THE MOST USEFUL VIDEO I HAVE EVER COME ACROSS, THE ONLY VIDEO THAT HELPED. Thankyou so much honestly. 🔥

  • @Bruh-py5hk
    @Bruh-py5hk 8 месяцев назад +3

    Thank you, I've been using online gdb for the longest, but just having the choice of vs code makes me happy. Make sure to restart the computer afterwards as well since it wasn't working until after.

  • @StefanBuchanan-h2w
    @StefanBuchanan-h2w 9 месяцев назад +26

    Thank you. My cmd line test didnt work at 3:57 but it worked in the MYSYS2 cmd line. This solved my issue with not having a compiler.

  • @awenixmusic
    @awenixmusic Год назад +71

    3:40 - For those who get the error "gcc is not recognized as an internal or external command", close the terminal and open the command prompt again but run as administrator.
    EDIT: It might not work instantly, you might as well reboot the system first.

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

      it still doesn't work

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

      it is just not working
      the only step where i am having issue is while doing that download in mysys2 as only 7 downloads turned successful out of 63

    • @vinamrajeet
      @vinamrajeet Год назад +22

      Instead of pasting it on path of user variable, paste it on path of system variable

    • @NawalAurna
      @NawalAurna 11 месяцев назад +2

      thank you it worked after doing as u said@@vinamrajeet

    • @itsrainingafterall
      @itsrainingafterall 11 месяцев назад +2

      THIS WORKED TYSM

  • @mrthugduck3782
    @mrthugduck3782 Месяц назад +1

    Thank you soooo soo much! I was trying to do some C++ learning, and Visual stdios would not work for me with C++!
    Anyone looking to fix your C++ problem on VS, defo use this youtube video!

  • @RanaAhmed-el6wm
    @RanaAhmed-el6wm 7 месяцев назад +1

    i can not even how I can thank you I got four hours trying to turn it on and I didn't know really really thank you .🥰🥰🥰💗💗💗

  • @taongaphiri6084
    @taongaphiri6084 Год назад +444

    This never works for me. It's like the world doesn't want me using vs code for c++, I followed this tutorial step by step, watched the video three times, and it still failed.

    • @KennyYipCoding
      @KennyYipCoding  Год назад +36

      Which step are you failing at?

    • @farisraid7588
      @farisraid7588 Год назад +46

      @@KennyYipCoding last step is just not working something is wrong with the compiler or something i have no clue this is my 3rd vid so far

    • @zombz4291
      @zombz4291 Год назад +94

      @@KennyYipCoding same, when i run there's no "C/C++ :g++.exe build and debug active file"

    • @mink9390
      @mink9390 Год назад +11

      ​@@KennyYipCoding yeah me too i try that for three times

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

      @@farisraid7588 Try restarting vs studio

  • @НоуНейм-к4й
    @НоуНейм-к4й 2 месяца назад +1

    BRO, THANK YOU SO MUCH! YOU ARE AWESOME! I was suffering the whole day, and can't understand why VSCode is not working i swear i felt like I'd been all over the internet to find something about my problem BUT you're video help me. Thank you again pal!!!

  • @christiangiamalis9924
    @christiangiamalis9924 3 месяца назад +4

    I love you. I have spend AGES doing this and this finally worked.

  • @rajratnakhaire
    @rajratnakhaire Месяц назад

    Thank you so much for your help in setting up my Visual Studio Code. Your guidance made the process so much easier.

  • @SiennaOfGalois
    @SiennaOfGalois 6 месяцев назад +1

    Such a helpful tutorial 👏 !!! I had initially installed an up-to-date msvc for my vscode as instructed but for whatever reason the compiler version would always default to 199707 (c++98) despite all the online tutorials I followed elsewhere and efforts I made trying to fix it. However, completely switching to minGW was amazing as everything got fixed and now my c++23 code runs flawlessly!

  • @amnamahboob4097
    @amnamahboob4097 2 месяца назад +1

    i have constantly failed in installing c++ in visual studio but today i managed to thanks to your video

  • @fahad11247
    @fahad11247 5 месяцев назад +2

    the simpilest and the easiest tutorial of running c++. Thanks alot

  • @harshanand901
    @harshanand901 9 месяцев назад +5

    alright folkes , everyhing in this video is awesome, just at the moment of running the code don't just blindly click on the first one, click on the one in which there is g++ and not gcc, took an hour+ of my time, but overall an awesome video. (gcc is for c while g++ is for c++ inputs and outputs)

    • @benji6325
      @benji6325 9 месяцев назад

      Thank you lol

  • @shahadeissax
    @shahadeissax 8 месяцев назад +2

    You saved me after 4 hrs of trying to run my code and facing problems thanks 😂

  • @rolandmuncher5438
    @rolandmuncher5438 Месяц назад

    Thank you man, I couldn't figure out the mingw and msys installation for the life of me and was using an online compiler for my code this whole. I basically had to force myself to make vscode work after my PC crashed and I lost all the code in an almost completed program.

  • @franzilovesstem
    @franzilovesstem 11 месяцев назад +10

    incredibly greatful for such a nice simple put tutorial!!! Very straight to the point! love it, thanks a ton:D

  • @yashwantchougale1600
    @yashwantchougale1600 10 месяцев назад +4

    Thank you very much for uploading this to the point tutorial! I could get cpp running in one go :)

    • @whateverittakes5340
      @whateverittakes5340 12 дней назад

      just saw your linkedin you're from IISER Pune 👀 (you're smart af)

  • @shreya_si9gh
    @shreya_si9gh 5 месяцев назад +1

    trying since yest but finally able to run my prog with help of the clear instructions you have provided on this video , Thank You !

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

    Took me the entire day just to set this up because of you, I can now turn to a new page. I THANK YOU, GOOD SIR.

  • @HARIPRIYASRIPERAMBUDURU
    @HARIPRIYASRIPERAMBUDURU 5 месяцев назад +1

    I done installation within few minutes.I've been looking for a video like this.thanks a lot!!

  • @amine4256
    @amine4256 13 дней назад

    I’ve seen a bunch of videos trying to run VS but without any results thanks to kenny for this amazing video ❤

  • @MuhammadameenKhan-i4v
    @MuhammadameenKhan-i4v 9 месяцев назад +2

    the best video i have ever watched . you explained this in detail and clearly thank you.

  • @MathieuComeau-g2j
    @MathieuComeau-g2j 9 месяцев назад +4

    This is so well-made, thank you!!
    Subscribed, keep up the good work

  • @NamNguyenNhatBao
    @NamNguyenNhatBao 3 месяца назад +1

    love this vid! i tried to code in vscode since 1 month ago but vscode can compile the coede and no it worked! tysm

  • @toneke0
    @toneke0 Месяц назад

    I have been trying to get this program to run correctly, and after tons of tutorials without success, yours worked perfectly. Thanks a lot!" :)

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

    I successfully downloaded this after a long time fixing erros, thank you very much for this useful video. If someone strugles with VS, I will highly recommand for them this.

  • @SteveOkyere-Gyamfi
    @SteveOkyere-Gyamfi 11 месяцев назад +15

    Thanks very much. You really helped me a lot.
    Very simple and straight-to-the-point video.
    Thanks a lot once again.😊

  • @suryanshbhardwaj3303
    @suryanshbhardwaj3303 Месяц назад

    One of the best guides available, it was easy and fast. tysm bro

  • @DivijMahajan-uc2uy
    @DivijMahajan-uc2uy 7 месяцев назад +1

    Worked in my case finally I am using vs code thankyou bro.

  • @WickedDev
    @WickedDev 4 месяца назад +1

    thank you bro I installed g++ and couldn't know why it wasn't working you're a life saver ❤❤

  • @baryaakov555
    @baryaakov555 2 месяца назад +4

    finally someone who goes over everything, spent two hours trying to figure this out, thank you!

  • @softwareengineer141
    @softwareengineer141 4 месяца назад +1

    Thank you so much! A try a lot of videos and always struggeles in running C and C++ code . Regards👏💯

  • @nicolassuarez2933
    @nicolassuarez2933 5 месяцев назад +1

    Cristal clear, outstanding!

  • @faisalsarang9655
    @faisalsarang9655 4 месяца назад +1

    Straight to the point thanks a ton!

  • @hehe-n3h4h
    @hehe-n3h4h Месяц назад

    bro this video was awesome! fast and easy been using visual studio but I'm so comfortable with VScode so thanks bro! subbed

  • @kasulejoseph9317
    @kasulejoseph9317 6 месяцев назад +2

    After 3 attempts, it worked out. Thanks for sharing

  • @ahmadjan7029
    @ahmadjan7029 10 месяцев назад +2

    I watched so many tutorials but this one worked thanks 😊😊

  • @I___I___1__l__1-1
    @I___I___1__l__1-1 Месяц назад

    THANK YOU SO MUCH I REINSTALLED VS CODE LIKE A MILLION TIMES I RESET MY WHOLE PC AND NOTHING WORKED UNTILL I FOUND THIS 315 GRAPHIC VIDEO TYY

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

    The article helped me put C++ into my VS Code. Thanks!

  • @judesikma
    @judesikma 4 месяца назад +1

    First it did not work, but I figured out it was just because for some reason the user variable thing didn't happen, so I did it again and it works!! tysm!

  • @aquilaaetius871
    @aquilaaetius871 19 дней назад

    Thanks for the video, finally i was able to set up c++ ​​in Visual Studio Code!!!)))

  • @justaweeb5052
    @justaweeb5052 3 месяца назад

    Thank you so much. I've been wanting to learn c++ for a while now but never got the C++ to run 🙏

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

    It was really a helpful video. It shows the exact procedure line by line. Thanks a lot.

  • @55.mallikarjunhiremath97
    @55.mallikarjunhiremath97 3 месяца назад +1

    Thank you so much for a easy and clean guidance.👍

  • @debasiskar9076
    @debasiskar9076 Месяц назад

    Thank you so much bro.
    Better than all other channels.

  • @Stydent-uz6rl
    @Stydent-uz6rl 9 месяцев назад +4

    I don't understand English very well, but I understand your language better than what is shown in my language. Thank you for your help.

    • @agustinehrman332
      @agustinehrman332 9 месяцев назад

      Could you solve this issue? It happened to me as well...

    • @agustinehrman332
      @agustinehrman332 9 месяцев назад

      Try selecting g++.exe when running instead of gcc.exe. That worked for me

  • @peach8335
    @peach8335 4 месяца назад +1

    omgg tysm!!! such a great and comprehencive guide!

  • @MoherZO
    @MoherZO 9 месяцев назад +1

    Perfectly running after your tutorial thanks.

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

    I think you are a teacher. Life made easy. Thanks.

  • @shroukkhaled7893
    @shroukkhaled7893 8 дней назад

    Thank you,
    From Egypt ❤ 🇪🇬

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

    I was so frustrated my code that worked perfectly fine in uni wouldn't work on my pc this is all I needed thank you

  • @CS-fz3vj
    @CS-fz3vj 4 месяца назад +1

    Best guide that worked for me, thank you

  • @aytenhuseynova5038
    @aytenhuseynova5038 Месяц назад

    the best and detailed guide. Thanks!

  • @fenrisfish2800
    @fenrisfish2800 10 месяцев назад +3

    Fantastic tutorial, was searching through a few videos to get started on c++ and this one was the best

  • @robertmontecalbo6119
    @robertmontecalbo6119 12 дней назад

    it works thanks men keep up the good work

  • @JY-mh8fr
    @JY-mh8fr 2 месяца назад

    Thanks, got it at 2 attempts. I got trolled by my pc at download 7 out ot 58 lol just rerun it and worked and smooth sailing at the end.

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

    Appreciate the help.

  • @princelappay8735
    @princelappay8735 3 месяца назад +1

    THANK YOU SO MUCH YOU HELPED ME A LOT!

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

    thanks men i really appreciate u giving such a detailed explanation video

  • @daFAQ__
    @daFAQ__ 5 дней назад

    Thanks man this worked out perfectly!

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

    Great video for beginners! Thank you so much!

  • @tria3745
    @tria3745 3 месяца назад +7

    For some people whom this didnt work for, try this. In your workspace folder, navigate to .vscode, and in there, will be a .json file. In that file, try replacing the gcc.exe to g++.exe in both the lines named label and command. That worked for me.

    • @hudson0125
      @hudson0125 3 месяца назад +1

      Thank you for saving me

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

      where do i find this workspace folder?

    • @Rich-ll8ce
      @Rich-ll8ce Месяц назад

      This works for me, but I have to edit this on every new project I make :( ... Avast antivirus deletes every .exe I create too, that's a pain.

    • @sarthsarode
      @sarthsarode Месяц назад

      Thank you for commenting this. Ive been trying to figure it out for months

  • @justaguy1321
    @justaguy1321 6 месяцев назад +1

    Thank you my friend, helped alot. All the best! 🙏

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

    Thank you so much! Very Helpful!

  • @gulai20
    @gulai20 Месяц назад

    Thank you Kenny Sir, Really appreciated.

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

    Your tutorial is great, it realy helped me. 😀

  • @breadisarting4044
    @breadisarting4044 21 день назад

    Worked perfectly, thank you.

  • @sidhumoosewala_-f6713
    @sidhumoosewala_-f6713 Месяц назад

    Shukria yar genuine video

  • @truckim4813
    @truckim4813 Месяц назад

    Thank you so much for this set up, it worked for me

  • @KamisatoAyato-b9k
    @KamisatoAyato-b9k 3 месяца назад +1

    ohh this actually helpful and first youtube tutorial that i watch and it works😮😮

  • @khizarkhan-u4n
    @khizarkhan-u4n 4 месяца назад +2

    Helpfull video thank you
    🤗

  • @LuckyTheRacer-m1b
    @LuckyTheRacer-m1b 4 месяца назад

    for me instead of adding in Path under USER variables, I added it to Path under SYSTEM variables and it worked.

  • @hcchen6337
    @hcchen6337 3 месяца назад +1

    Thank you a lot. I LOVE YOU!!!!

  • @StacyJaxen
    @StacyJaxen 4 месяца назад +1

    thanks so much this was a good clean start

  • @ChiragAnandAD-
    @ChiragAnandAD- 4 месяца назад

    Excellent , Got it in a one go

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

    Very well explained. Thank you for this wonderful video :)

  • @sooiya9271
    @sooiya9271 Месяц назад +1

    for people who had problem with gdb but gcc and g++ worked well:
    open MSYS2 and run command: "pacman -S mingw-w64-x86_64-gdn" (wait to install remain files for gdb)
    then again opened enviromental variable and paths as it is shown it video 2:52
    now he added only C:\msys64\ucrt64\bin in video but you should add C:\msys64\mingw64\bin as well at the same place
    now try to run gdb --version and it should work.

  • @AnujSrivastava-hk5ov
    @AnujSrivastava-hk5ov 5 месяцев назад

    Great !!! Simple Clean & Fast

  • @rezapratama391
    @rezapratama391 4 месяца назад +1

    Thank you very helpful!

  • @inshalthevlogger
    @inshalthevlogger 11 дней назад

    thnx for this information i was misguided and i was not able to download it but now i am able thnxa lot you hhave solved a big problem of mine

  • @krishnakumarshetti9334
    @krishnakumarshetti9334 Месяц назад

    Very helpful tutorial. Thank you!

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

    Finally an easy tutorial with no bullshit that actually works

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

    THE BEST GUIDE EVER

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

    It worked, thank you so much!

  • @TheProgrammingPod
    @TheProgrammingPod 8 месяцев назад

    Great and quick tutorial!

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

    such a great and helpful video ! Thank you very much :)

  • @hajperito7470
    @hajperito7470 8 месяцев назад +9

    I have a problem with launch.jackson please help

  • @TOMAR2310
    @TOMAR2310 8 месяцев назад

    The best so far...ty

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

    Thnaks a lot Buddy that was a 10/10 helped me 1000%

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

    THANK YOU, it finnaly works.

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

    Thanks man! Great video!