How to Set up Visual Studio Code for C and C++ Programming
HTML-код
- Опубликовано: 26 ноя 2022
- In this video ill show you how to setup visual studio code for c/c++ programming on windows , we will first download and Install C/C++ toolset like mingw which is a c/c++ compiler and then we will download and install code runner extention in vscode.
If you can't download mingw from the sourceforge ,try this : drive.google.com/file/d/19tXOe50ktd4Hhv7WIbyMC0s7e5TqlRa1/view?usp=drivesdk
thx
when i run the code it is showing 'Access is denied.' what should i do? i don't have any antivirus programs too
what is the vs code theme you are using?
i have done everything as in the tutorial and the shit won't work. tried to fix it, reinstall it and nothing works
Thank you C-Wizard! Holy buckets finally i installed it, now i can continue in cs50x !
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!!!
This channel gives you exactly what you need
Just wanted to say thank you! This was simple, and worked for me without problems. Very well done!
Glad it helped!
🤩Thanks man, finally got my C program compiled and ran in VS Code, woo-hoo! :D
You are incredible! This was super thorough, so many other videos led me down the wrong path.
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!
I have the same problem. How did you restart VS Code?
You can't imagine how much it helped me, I was searching for this information for a very long time.
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
thanks for the easy tutorial! configuration is way much harder than coding itself 😄
Lol ! I'm glad it helped
Nah fr😵💫
idk why microsft not just make c++ as the base code language without setup like this. It's so pointless
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
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!
true
and the funny thing is that video has more views than this one
WHAT A FOOKIN TIMEWASTE
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!!
Best guide that I've come across. Thank you so much!
omg I was struggling so much with Visual Studio, I didn't knew mingw was a thing
Thanks a lot because of your video I was able to install the gcc properly and run C++ code !!!
It worked! Concise and straight to the point.
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!
Glad I could help!
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??!!??
chusssssssssss
Lol ! 😂
sahi kaha yr @@nightopia2911
Hehe🤣🤣🤣🤣🤣🤣
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
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
I spent 3 days and some change to find the correct compiler path, and you literally save me!
Since 3 months now I can run the code successfully... Ahhh... Thanks a lot bro..
Im glad it helped
Thank you it worked🙏, It's been more than a month trying to run my codes
thanks it worked. after struggling with it for months, finally the problem is solved.
Thank you soooo much. You made it sound so simple.
It saved me a lot of headaches. Thanks a million.
Glad it helped!
bro earned a subscriber, i had been struggling from hours on it
ThankYou Bro I was stuck at this for 3 days finally found this wonderful tutorial you deserve a sub ❤❤
10000% true
Excellent Kumar, straightforward, simple and easy. Thanks
This was very nicely done, great video!Thank you.
You're welcome
Love this. Easy and straight to the point. My codes started running instantly 😇😇
Thanks mate! I finally ran my first c++ program :)
thanks, straight to the point without fluffs
🙌
@@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
After reinstalling it's working now...
Thank you for this video my friend.
Really cleared up a lot for me.
Im glad it helped man
Thank you after like 5 videos nothing worked till I watched yours thx
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
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.
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.
@@grimmister where to type this in terminal or any other ?
Thank you so much!
Tq very much brother it helped a lot ♥️♥️
@@SunilSuni-qd3edIt still not work written as system cannot find the path specified what should I do now ?
Thank you so much man. It's really helpful ✌️✌️
That was the most helpful video I've even seen and thank you for making it short
Glad it was helpful!
thanks code bear i ran out from a big setup problem today by watching urs tutorial
Great video, i was having trouble installing the compiler and this video helped me
Glad it helped
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.
but how
@@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.
That's not eirking
Working
@@jeramiahcogar8277 try to save ur code b4 running maybe it worked for me
you literally saved me from burning my nerves THANK YOU
😂 you are welcome , dont forget to like and sub
Tnx bro!!! I've been trying for three days... your video is the only successful one
This helped SOOOO much!!! I can finally do C/C++ and am not stuck to Java Python HTML JS CSS and Bash!!!
Thanks. Short and to the point!
Thanks it works finally some concise and to the point video.
You're welcome!
Short and to the point great!
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.
Thank you so much
THANK YOU SO MUCHHHH
Thank You Very Much
Thank you!
Simple and easy to follow, thank you!
Thant You! Been trying to figure this out forever.
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.
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.
So much easy, clear and straightforward! Many Thanks!
Hii, Farhan can you help me out to solve this error I have tried everything reinstalled MINGW but still it is showing error
@@am_dazzle sure, i'll try. what error are you facing?
I don't know what's going on brother please help me 🙏🏻
Can you tell me if I share my screen
@@am_dazzle i'm not so sure unless i see it
Can you give me your Instagram id so that I can send you a screenshot
finally !!!! Thanks a lot .... saw lots of video... tried again and again ..... followed your steps just once and its working .....thankyou very much !!!!!!
You are a lifesaver! Thank you so much. It worked 100%
You're welcome!
Thanks so much for this - really concise and helpful! :)
You're welcome
Thanks for the guide. This is actually clearer than the docs from Microsoft!
Im glad it helped
microsoft is the very last place you go for clarity. Everything microsoft does is tainted with weirdness. The Bill Gates Vibe I guess !
u do realize this version is not 64 bit right. also u won't have to newest versions of the compilers and headers.
@@edwardmacnab354 u sound like a noob who knows nothing tbh. the Microsoft docs were fine 😂
He was the average RUclipsr until the last moments of "The C++ program tells you to subscribe..."🤩
Thanks man. Was very helpful!
Just started learning c++ for my autonomous mobile robotics class and I was running into problems but this helped, thank you.❤
likewise..
great work. You helped me so much :D
Thank you for this tutorial. It worked perfectly fine.
Worked perfectly. Thank you, sir.
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
I'm going through the same thing
Yes exactly the same
Me as well
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 RUclips 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.
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
detailed and clear. super helpful.
ive been trying to compile my code for a week now but all the instructions i got were BS, thank you for the help!
Thank you for this video, it helped me alot and was very easy and simple to follow!
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.
Just tell your viewers to restart VSCode if it was already open. Otherwise, very straightforward instructions.
thanks man this was what was missing
thank you so much i was tying to run c++ in visual studio for few days
Thanks alot, what a straight forward solution!
Straight to the point. Keep up the work!
thanks, works, very brief and easy to follow
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
Loved it, short and accurate
Thanks
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.
there you go buddy , ruclips.net/video/8xNhnmF9ATs/видео.html
Every single video/tutriyal
Hahahaha
I could marry you right now, took ages to figure this out. Watched other videos and none explained it as clear as you did
'gcc' is not recognized as an internal or external command,
operable program or batch file.
'gcc' is not recognized as an internal or external command,
operable program or batch file.
error in vs code
We got same problem bro
@@maskguy8436 This is maybe due to this tutorial is meant for C not C++
Use "code blocks" for C++ much easier setup
same problem
a big thanks from all the beginners.
Great walkthrough!
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?
If anyone getting error just try to add the path in System variables rather than User variables it really helped😊
MAAAAAAN THANK YOU SM IT HELPED !!!
Thank you so muchh, finally a worthy video
Thank you so much. It helped me a lot.
Hello, you put cc Cambodia for me to see easily❤️❤️
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?
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
Thank you sooo much. This helped a bunch!.
God bless you sir❤
Thanks for this video, it helps me amazingly. ❤
Not working in Windows 11 and recent Visual Studio Code, and other plugins!
Bro pls help me
The following error appeared in the terminal for me: " 'gcc' is not recognized as an internal or external command, operable program or batch file."
What do I do?
Bro leave a space between gcc and -
ran into the same issue, make sure you click "new" then paste, then ok. I had the issue because i didnt press "new" and then paste it but just clicked the blank space and typed it in then pressed ok, which then it didnt work. Hope this helps for anyone
Thanks...your video works like a charm everytime
thankyou thankyou thankyyou thankyou soooo much i can't describe my happiness in words i was trying so hard i watched half of the youtube for this. finallly the best decision you made in your life is this video ❤❤❤❤❤❤❤❤❤❤❤❤
Im glad it helped
it is giving me the "error compiling" and the g++ is not recognized as a internal or external command
:((((
Yep, you need to install mingw , once done the error is resolved
@@tarzantiger7927 nahi hora..
@@saniyasaniya8672 just check apne mingw ka path add kiya hai ki nahi / you are debuging the code in place of running it
@@tarzantiger7927 I am getting command not foub even though I have added path
It sadly gives me an error when i try to run/debug the code stating that the file executable does not exist while I can see it exists in the same folder I am working on.
Samee
thanks man, no one was actually telling the truth that we need to install mingw minimalist GNU instead mingw w64
This video made me easier to install.thank you brother
Im glad it helped
for anyone getting gcc not recognized even after manually adding the path in environments (mine kept disappearing),, in the cmd prompt type set Path=C:\MinGW\bin; took me 10 syntax errors to figure it out lol YOU HAVE TO TYPE IT EXACLY LIKE THAT
set Path=C:\MinGW\bin; (I INSTALLED ON WINDOWS 10 C DRIVE)