How to Set up Visual Studio Code for C and C++ Programming

Поділитися
Вставка
  • Опубліковано 19 лис 2024

КОМЕНТАРІ • 1,1 тис.

  • @thecodebear
    @thecodebear  4 місяці тому +20

    If that didn't work checkout the updated version here : ua-cam.com/video/KnPj8Ow3bM8/v-deo.html

  • @mahiranjan5844
    @mahiranjan5844 Рік тому +75

    Thanx a lot for this video. The installation process of MinGW has changed and most of the videos are old. Only this one explains the current procedure, thanks a lottt!!!

  • @MamaMia84oo7
    @MamaMia84oo7 Рік тому +39

    This man is a genius. He has figured out how to time travel. He just simply says “ Im going to fast forward” it happens, he travels into the future. Why isn’t anyone talking about this??!!??

  • @pacerbx3084
    @pacerbx3084 Рік тому +44

    I tried another video, it told me to download some msys64 stuff, afterwards it told me to download some packages of mingw and that took over 15 mins. Finally when I thought it was done, I checked and it showed that there was some errors and the download was interrupted. Overall this whole process took me an hour and 30 mins until I found your video. LITERALLY! IT TOOK ME LESS THAN 5 MINS WHEN I WAS FOLLOWING UR GUIDE! Just know that I love this your video's and your a lifesaver!

    • @vd9570
      @vd9570 4 місяці тому

      true
      and the funny thing is that video has more views than this one
      WHAT A FOOKIN TIMEWASTE

    • @thecclicker
      @thecclicker 9 днів тому

      bro i asked chatgpt it made me do all of that stuff but it didnt worked
      this finally helped me

  • @stevefalcigno2092
    @stevefalcigno2092 10 місяців тому +23

    Just wanted to say thank you! This was simple, and worked for me without problems. Very well done!

  • @emanfey
    @emanfey Рік тому +39

    This channel gives you exactly what you need

  • @isadamii
    @isadamii Місяць тому +2

    Bro thank you so much some guy had a 4 hour tutorial that didnt help at all but you fixed all my problems in just 5 minutes, I subbed and liked!

  • @EnochKabange
    @EnochKabange Рік тому +19

    Worked like a charm. I had to restart VS Code to effect the changes as I was having errors of "GCC not blah blah" until I restarted the software. Thanks!

    • @betulbozduman8886
      @betulbozduman8886 8 місяців тому +1

      I have the same problem. How did you restart VS Code?

    • @cijasathish3761
      @cijasathish3761 4 місяці тому

      was struggling with this step! all I had to do was restart. thanks much

  • @husnashariff568
    @husnashariff568 Рік тому +6

    Since 3 months now I can run the code successfully... Ahhh... Thanks a lot bro..

  • @tutkualtas9108
    @tutkualtas9108 6 місяців тому +2

    You can't imagine how much it helped me, I was searching for this information for a very long time.

  • @cartierdreams9856
    @cartierdreams9856 Рік тому +38

    Definitely precise and to the point, if the script doesn’t work once you install, restart your device and open up VScode it should work fine

  • @Sugarplum156
    @Sugarplum156 День тому

    Thank you so much finally I have installed it successfully....I was doing it for past 3 months and now I am able to install.. Thank you again🥰

  • @yourty3966
    @yourty3966 Рік тому +24

    Thank you very much. I'm a rookie programmer who is only 18. But I love programming very much and I'd like to use vs code to program. I used to code python which is the simplest program language and already set up in vs code. So I don't need to do anything to activate it like C++. But when I wanted to try C++. I found it doesn't work at all. I tried to change some setting in vs code but it doesn't work still. After watching this video I finally know actually I should install MinGW and code runner. Thank you very much. I'll keep coding

  • @gabehanby6646
    @gabehanby6646 Рік тому +405

    If you're getting an error in vscode after trying to run your scripts, you likely did nothing wrong try restarting your vscode after you've installed and added mingw to your path.

    • @grimmister
      @grimmister Рік тому +51

      Thanks man, this helped. "For those who are still facing the error "gcc is not recognized". Just type "set Path=C:\MinGW\bin;%PATH%" and press enter." also helped me before that.

    • @pushkarpandey3513
      @pushkarpandey3513 Рік тому +7

      ​​@@grimmister where to type this in terminal or any other ?

    • @thecountofgoldmoor1332
      @thecountofgoldmoor1332 Рік тому

      Thank you so much!

    • @SunilSuni-qd3ed
      @SunilSuni-qd3ed Рік тому +1

      Tq very much brother it helped a lot ♥️♥️

    • @kamranshehzad6560
      @kamranshehzad6560 Рік тому +2

      ​@@SunilSuni-qd3edIt still not work written as system cannot find the path specified what should I do now ?

  • @akakiburjanadze2387
    @akakiburjanadze2387 Рік тому +212

    thanks for the easy tutorial! configuration is way much harder than coding itself 😄

    • @thecodebear
      @thecodebear  Рік тому +12

      Lol ! I'm glad it helped

    • @franciscopena6612
      @franciscopena6612 Рік тому +4

      Nah fr😵‍💫

    • @Ziiio
      @Ziiio Рік тому +30

      idk why microsft not just make c++ as the base code language without setup like this. It's so pointless

  • @SantoshDashTech
    @SantoshDashTech 2 місяці тому

    After so many try to run c++ on visual Studio code finally this video is working perfectly, no issue is there🎉❤

  • @shishirr775
    @shishirr775 6 місяців тому +3

    After countless videos, this was the only one that worked for me. You are a lifesaver!
    Edit : Please help, it runs just fine but does not let me input any values in the output tab, I unchecked read- only attribute and it still doesnt work. Please please help

  • @vixenin
    @vixenin Рік тому +8

    omg I was struggling so much with Visual Studio, I didn't knew mingw was a thing

  • @funlife3342
    @funlife3342 6 місяців тому +2

    finally !!!! Thanks a lot .... saw lots of video... tried again and again ..... followed your steps just once and its working .....thankyou very much !!!!!!

  • @demirbaydemir8496
    @demirbaydemir8496 11 місяців тому +49

    If your having troubles about vs code not finding the g++ command of your MinGW, at this point of tutorial (3:52) when you created a new variable as your path move that to the top by using the move up button, then restart your terminal/vs code and that should work.

  • @Xardimods
    @Xardimods 2 місяці тому

    Thanks for making this video for C++ beginners! I appreciate your effort on describing the process of the instalation of the compiler, as well as the process of setting up the right path to make the compiler works. Again, thanks!

  • @someone18879
    @someone18879 Рік тому +9

    🤩Thanks man, finally got my C program compiled and ran in VS Code, woo-hoo! :D

  • @charlesw6429
    @charlesw6429 2 місяці тому

    Thank you so much. I have been having so many issues with all the other videos simply trying to get Visual Studio code set up and I finally came across your video and everything went smoothly. This video was so useful thank you so much again.

  • @axpers99
    @axpers99 Рік тому +247

    For those, who gets an error even after adding environment variable (path). You can add it to system path, and relaunch you cmd. It will work just fine.

    • @ArchanaKumari-wh9dj
      @ArchanaKumari-wh9dj Рік тому +6

      but how

    • @axpers99
      @axpers99 Рік тому +17

      @@ArchanaKumari-wh9dj In your start menu, search for env, click on "Environment Variables", then in the "System variables", double click on "Path", "new" and insert the path there.

    • @jeramiahcogar8277
      @jeramiahcogar8277 Рік тому +1

      That's not eirking

    • @jeramiahcogar8277
      @jeramiahcogar8277 Рік тому +3

      Working

    • @ArchanaKumari-wh9dj
      @ArchanaKumari-wh9dj Рік тому +8

      @@jeramiahcogar8277 try to save ur code b4 running maybe it worked for me

  • @joshuageorge9679
    @joshuageorge9679 7 місяців тому

    Thank you so much for this genuinely, I had been trying different things for almost 2 hours and now all my errors are finally fixed, thanks a lot!!

  • @JustBasicJoseph
    @JustBasicJoseph Рік тому +6

    Thank you So So Much, I've been trying to figure out why my code wouldn't output. But now I am able to use Visual Studio Code because of you. Thank you so much!

  • @UddhavBanik
    @UddhavBanik 4 місяці тому

    Very helpful. I was trying to fix the issue of my code not running at all when I stumbled across this video. Worked for me very well

  • @cristianvillalobos7701
    @cristianvillalobos7701 Рік тому +21

    You are incredible! This was super thorough, so many other videos led me down the wrong path.

  • @simplylokaamv3541
    @simplylokaamv3541 Рік тому

    Omg thank sooo much I need to ran it for college , such easy explanation
    If you face any problem on cmd close and open it again

  • @jhazztill132
    @jhazztill132 Рік тому +3

    I spent 3 days and some change to find the correct compiler path, and you literally save me!

  • @devansh_903
    @devansh_903 Рік тому

    thanks it worked. after struggling with it for months, finally the problem is solved.

  • @27anshulsd
    @27anshulsd Рік тому +8

    Just tell your viewers to restart VSCode if it was already open. Otherwise, very straightforward instructions.

  • @Studywithme-q4i
    @Studywithme-q4i 10 місяців тому +1

    That was the most helpful video I've even seen and thank you for making it short

  • @youtubeuser2352
    @youtubeuser2352 Рік тому +44

    It worked! Concise and straight to the point.

  • @bhaskarbharati5663
    @bhaskarbharati5663 2 місяці тому

    Finally run C++ on VS code. Thanks man for saving time.

  • @strayXZIST908
    @strayXZIST908 2 місяці тому +1

    you're the best human i saw till this date

  • @SperkSan
    @SperkSan Рік тому +4

    Great video, i was having trouble installing the compiler and this video helped me

  • @Lelouch-vi-Britania
    @Lelouch-vi-Britania Рік тому +2

    ThankYou Bro I was stuck at this for 3 days finally found this wonderful tutorial you deserve a sub ❤❤

  • @kxngduvie7682
    @kxngduvie7682 Рік тому +10

    Just started learning c++ for my autonomous mobile robotics class and I was running into problems but this helped, thank you.❤

  • @FaithForGod
    @FaithForGod Рік тому

    Thank you after like 5 videos nothing worked till I watched yours thx

  • @jasonconrad7625
    @jasonconrad7625 Рік тому +3

    Best guide that I've come across. Thank you so much!

  • @abmemo9740
    @abmemo9740 25 днів тому

    Thank you. I was having trouble installing gcc directly from VS Code Blogs but this method solved the issue.

  • @letsplaysandplaythroughs5241
    @letsplaysandplaythroughs5241 Рік тому +3

    I have been trying to figure this thing out for 2 hours now, thanks to you i did it in 2 minutes. Thank you so much.

  • @SohamDDode
    @SohamDDode 3 місяці тому +1

    Thanks! this video has given the most easiest step to resolve the path compiler issue

  • @naderbazyari2
    @naderbazyari2 Рік тому +4

    It saved me a lot of headaches. Thanks a million.

  • @MarkoStrelica
    @MarkoStrelica 4 місяці тому

    Tnx bro!!! I've been trying for three days... your video is the only successful one

  • @michaelslifecycle
    @michaelslifecycle Рік тому +49

    In cs50 they just went straight into teaching us code on VS code and completely skipped telling us how to set it up. I was completely dumbfounded getting so many error messages just trying to type hello, world XD

    • @sbmod3083
      @sbmod3083 9 місяців тому

      I'm going through the same thing

    • @demonyt3296
      @demonyt3296 9 місяців тому

      Yes exactly the same

    • @SjsjsAowod
      @SjsjsAowod 9 місяців тому

      Me as well

    • @ignacioenriquemendezchavez5912
      @ignacioenriquemendezchavez5912 8 місяців тому

      I thought the same thing but actually David mentions that they are using their cloud version
      Witch you can access very easily in the page of cs50, I don’t know if any of you are taking it entirely on UA-cam but the page has a ton of information besides the lectures, like de duck AI, vs code for cs50, GitHub access for the problem sets and more información about the topics.

    • @MrSanfrinsisco
      @MrSanfrinsisco 8 місяців тому +2

      The reason for this was because people actually in that class were given a cloud based version, meaning they didn't have to install anything and were able to just jump in and start coding. Then much later on down the line David mentioned he would help them install it onto their computers so when the class was over they could continue working on projects even if it's the only class they take, but for everyone else, yea we have to just figure it out lmao

  • @gobbogrob
    @gobbogrob Рік тому +1

    you literally saved me from burning my nerves THANK YOU

    • @thecodebear
      @thecodebear  Рік тому +1

      😂 you are welcome , dont forget to like and sub

  • @helltanker19
    @helltanker19 Рік тому +30

    Thanks for the guide. This is actually clearer than the docs from Microsoft!

    • @thecodebear
      @thecodebear  Рік тому +4

      Im glad it helped

    • @edwardmacnab354
      @edwardmacnab354 Рік тому +11

      microsoft is the very last place you go for clarity. Everything microsoft does is tainted with weirdness. The Bill Gates Vibe I guess !

    • @anon-fz2bo
      @anon-fz2bo Рік тому +1

      u do realize this version is not 64 bit right. also u won't have to newest versions of the compilers and headers.

    • @anon-fz2bo
      @anon-fz2bo Рік тому

      @@edwardmacnab354 u sound like a noob who knows nothing tbh. the Microsoft docs were fine 😂

  • @notorious4745
    @notorious4745 Рік тому

    thank you so much man! I have been struggling with this for like a day and every other video did not work, you rescued me

  • @devvv4616
    @devvv4616 Рік тому +47

    thanks, straight to the point without fluffs

    • @thecodebear
      @thecodebear  Рік тому +4

      🙌

    • @surajbokade66
      @surajbokade66 Рік тому +3

      ​​​@@thecodebeary, Everything was going perfect but after compiling (gcc file.c) .exe file was not creating...as a result, after giving command .\a.exe, code is not running
      Plz help

    • @surajbokade66
      @surajbokade66 Рік тому +2

      After reinstalling it's working now...

  • @GetInTheMuse
    @GetInTheMuse 6 місяців тому

    Love this. Easy and straight to the point. My codes started running instantly 😇😇

  • @Pickle236
    @Pickle236 Рік тому +5

    This helped SOOOO much!!! I can finally do C/C++ and am not stuck to Java Python HTML JS CSS and Bash!!!

  • @Raymanujan
    @Raymanujan 27 днів тому

    superb. well-paced, and not too thick of an accent.

  • @farhanrejwan
    @farhanrejwan Рік тому +18

    So much easy, clear and straightforward! Many Thanks!

    • @am_dazzle
      @am_dazzle Рік тому

      Hii, Farhan can you help me out to solve this error I have tried everything reinstalled MINGW but still it is showing error

    • @farhanrejwan
      @farhanrejwan Рік тому

      @@am_dazzle sure, i'll try. what error are you facing?

    • @am_dazzle
      @am_dazzle Рік тому +1

      I don't know what's going on brother please help me 🙏🏻
      Can you tell me if I share my screen

    • @farhanrejwan
      @farhanrejwan Рік тому

      @@am_dazzle i'm not so sure unless i see it

    • @am_dazzle
      @am_dazzle Рік тому

      Can you give me your Instagram id so that I can send you a screenshot

  • @mairait
    @mairait 4 місяці тому

    thanks a lot for this video. its helped me alot.i was troubling with it for many days but finally i find the solution.the best video on youtube.

  • @aspiringprogrammer2820
    @aspiringprogrammer2820 Рік тому +7

    This got to be the funniest thing ever,i did precisely everything you did,and it was going well,all of it,and in the very end when i clicked to run the file it appeared that gcc is not reconized as a internal or external command,im always out of luck with this computing tutorials,every single video it doesnt work for me,always,but thanks anyway XD.

  • @xolilengcobo9969
    @xolilengcobo9969 Рік тому

    Thank you it worked🙏, It's been more than a month trying to run my codes

  • @JoseEspinoza-ht8cx
    @JoseEspinoza-ht8cx Рік тому +6

    Excellent Kumar, straightforward, simple and easy. Thanks

  • @Manuel-vz3cu
    @Manuel-vz3cu 9 місяців тому

    ive been trying to compile my code for a week now but all the instructions i got were BS, thank you for the help!

  • @MissoyKE
    @MissoyKE Рік тому +8

    Thank you for this video my friend.
    Really cleared up a lot for me.

  • @ramishkageenath
    @ramishkageenath Рік тому +2

    What a brilliant tutorial ! . Your voice is supper clean. Keep it up bro ❤

  • @Not6ne
    @Not6ne Рік тому +8

    If anyone getting error just try to add the path in System variables rather than User variables it really helped😊

  • @Asrokid20NOV27
    @Asrokid20NOV27 Рік тому

    Thank you bhaiya bohot help hua , bohot din se problem me fasa tha !!

  • @jamesbondisamonkey
    @jamesbondisamonkey Рік тому +5

    This was very nicely done, great video!Thank you.

  • @TylerSmith-ep7gk
    @TylerSmith-ep7gk Рік тому

    I could marry you right now, took ages to figure this out. Watched other videos and none explained it as clear as you did

  • @MJ-lo5ik
    @MJ-lo5ik Рік тому +4

    Thank you very much. I was lost at first and thought “why do I need to do all these steps?” Because in my school the PCs were probably already setup. I was a bit skeptical 😅 and to be fair I’m still a bit worried if I did anything wrong but nevertheless I am able to code in VS now.

  • @7clouds26
    @7clouds26 4 місяці тому

    thanks code bear i ran out from a big setup problem today by watching urs tutorial

  • @einfacheente
    @einfacheente Рік тому +4

    Straight to the point. Keep up the work!

  • @panosflp724
    @panosflp724 Рік тому

    OMG YOUR THE BEST THANKS VERY MUCHHHHHHHHHHHHHH!!!!!!!!!! I LOVE you TILL I DIE

  • @jcwljs1246
    @jcwljs1246 Рік тому +5

    Thank you soooo much. You made it sound so simple.

  • @beng6319
    @beng6319 Рік тому +2

    Thanks mate! I finally ran my first c++ program :)

  • @lokesh666
    @lokesh666 Рік тому +5

    Thank you so much man. It's really helpful ✌️✌️

  • @harleensingh-c2l
    @harleensingh-c2l Рік тому

    bro earned a subscriber, i had been struggling from hours on it

  • @the5gguru
    @the5gguru Рік тому +5

    Thanks. Short and to the point!

  • @JhoneRavizoni
    @JhoneRavizoni 7 місяців тому +1

    I followed Microsoft's tutorial, no success. This tutorial worked better for me.

  • @crouserhd297
    @crouserhd297 Рік тому +3

    great work. You helped me so much :D

  • @Hrcian
    @Hrcian Рік тому +1

    very helpfull video sir thank you a lot

  • @mugdhamonga25
    @mugdhamonga25 Рік тому +4

    Loved it, short and accurate

  • @Chrollo_x2
    @Chrollo_x2 Рік тому +1

    thanks man, no one was actually telling the truth that we need to install mingw minimalist GNU instead mingw w64

  • @ranjithamahadevu5015
    @ranjithamahadevu5015 Рік тому +8

    I got no errors in the command prompt but while running the programs it is showing, 'gcc' is not recognised as an internal or external command, operable program or batch file. How to fix it?

    • @JarppaGuru
      @JarppaGuru 9 місяців тому +1

      open command promt and write gcc. is it working? if not then system path not setup. it cant find gcc.exe magically. you need tell what folder is it
      i open terminal on vscode
      gcc -o test.exe test.c
      boom! zaam! no need any extensions. it means i can easy use notepad and console like 20 years

  • @ansarianam3329
    @ansarianam3329 Рік тому

    Thanks alot...
    I was struggling alot since one week. Your video helped alot.
    Thnx sir...

  • @muhammadputrasirrhasri
    @muhammadputrasirrhasri 7 місяців тому +7

    sorry, if when we check gcc at cmd and it says
    'gcc' is not recognized as an internal or external command,
    operable program or batch file.
    what i have to do?

    • @dust3863
      @dust3863 Місяць тому

      Same problem did you find the solution?

  • @mansimewara9463
    @mansimewara9463 Рік тому +2

    Thanks a lot because of your video I was able to install the gcc properly and run C++ code !!!

  • @NityamJoshi-uv8bh
    @NityamJoshi-uv8bh Рік тому +8

    detailed and clear. super helpful.

  • @prabhatkumarram8541
    @prabhatkumarram8541 4 місяці тому

    a big thanks from all the beginners.

  • @mauricioquiroga7209
    @mauricioquiroga7209 Рік тому +6

    Yes it works but, when the program needs the user to do some input, I cannot act as an user to enter input into the window, how do I fix this?

  • @_kj_.
    @_kj_. Місяць тому

    Thanks Bro ❤😀!! It worked perfectly without any error. You saved my a lot of time.

  • @Alex-wg9bi
    @Alex-wg9bi Рік тому +4

    Simple and easy to follow, thank you!

  • @spurs5128
    @spurs5128 Рік тому +1

    Thank you so muchh, finally a worthy video

  • @evarosesummerfield9311
    @evarosesummerfield9311 Рік тому +5

    Thanks so much for this - really concise and helpful! :)

  • @GamerboyINDYT
    @GamerboyINDYT 2 місяці тому

    thank you so much Sir . this video really very helpful for me again thank you and " Happy Teachers Day ".

  • @furkangunes04
    @furkangunes04 Рік тому +9

    Not working in Windows 11 and recent Visual Studio Code, and other plugins!

  • @olivierbakoyogo1324
    @olivierbakoyogo1324 4 місяці тому

    Man you're a life saver.
    Thanks for your work. Really helpful 🙏🏿

  • @KrisLi-o4b
    @KrisLi-o4b 9 місяців тому +3

    Thank you! How did you make "run" as the default icon (5:22)? Mine has "debug c/c++ file" as default.

    • @GAMEWITHIMAD
      @GAMEWITHIMAD 3 місяці тому +1

      Just run it one time or press ctrl+alt+n one time

  • @Mukul_Anand372
    @Mukul_Anand372 Місяць тому

    Thanks this video is really infromative with easy steps thank u from India

  • @petermwangi3619
    @petermwangi3619 4 місяці тому +6

    how do i fix this error by cmd
    gcc' is not recognized as an internal or external command,
    operable program or batch file.

  • @misterretrowolf1464
    @misterretrowolf1464 3 місяці тому

    Very much appreciated the clear instructions. Thanks, it was very helpful!

  • @NithishSV-m3h
    @NithishSV-m3h 4 місяці тому +3

    here i have changed the environmental path but i have an error or
    "'gcc' is not recognized as an internal or external command,
    operable program or batch file."

  • @NoelNinanSheri
    @NoelNinanSheri 10 місяців тому +1

    Thank You. The Explanation was precise and really helpful