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!
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 :)
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.
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 ! 😊
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.
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.
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.
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.
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.
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!!!
I received the following errors when running it: Errors: The preLaunchTask 'C/C++: gcc.exe build active file' ended with exit code -1. Compilation completed with errors. * The terminal process ended with the exit code: -1. * The terminal will be reused by tasks, press any key to close it. Solution in this case: The solution was to follow the Visual Studio Code documentation for C++, reinstall the extension package and choose this "Choose C/C++: g++.exe compiles and debugs the active file from the list of compilers detected on your system." I had previously chosen cpp.exe and it did not work. After that everything works correctly I hope they work And thank you very much for the tutorial Kenny!
Hi I have a question, so I followed ur vid and tried the part where I run the build and run the hello world code, when I ran the code an error appeared saying launch: program 'C:\C++\test.exe' does not exist. How do I fix this?
Me too the same problem ! , i tried a right clik and run code it work perfectly 👌🏽 , but when i try his method to run the code it happen the same problem i don't know why 🤷🏼♀️ Any way 😅 the code works perfectly when i made Ctrl+Alt+N
I have one problem with VSCODE. When i run the code, an error appears "performing the preliminary task "C/C++: gcc.exe the build of the active file is " completed with exit code -1". in the "problems" is written package.json / You should not use the "*" activation, as it affects performance. How to solve this problem?
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!
it's not working from the very first line with "#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (D:\Other\theSigame andom stuff\Valorant-TriggerBot-main\val trigger\val_trigger\vt\tests.cpp).C/C++(1696)"
I have a problem which says launch problem does not exist... I did everything the same way you did and there is an error about text.exe. I am not sure what it is exactly, because I am still pretty new to coding.
3:45 what to do if it show me message like this " 'gcc' is not recognized as an internal or external command, operable program or batch file" i did everything just like in the video but it doesnt work
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)
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.
The solution is at 6:08 he tells you to use the first option. Sometimes the right option for users is the second one based on how they're ordered. Mine were named exactly the same, but one gave me the error and the other didn't.
it still says "'gcc, g++ or gdb (i tried them all)' is not recognized as an internal or external command, operable program or batch file." why wont this work?
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.
the code to be copied from the vs code dowload site for c++ as mentioned in this video doesnot work in my laptop i have tried several times and it just says command not found when i try to run in msys2. can anyone help me?
Hello Kenny, thanks for your video, i'm having a problem when i want to run my codes whenever i want to run it, it sends me into my terminal's output section and says "'scriptcs' is not recognized as an internal or external command, operable program or batch file." can you help with this?
I am having a problem at the last step where you are supposed to run the program. It says " Launch: Program (then the location in where the file is supposed to be) does not exist" Is anybody else having the same problem?
@@mjmrvll Make sure you are in the same directory with the c++ file. And make sure file path to the c++ file does not include blankspaces or non-english characters. File names especially
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!
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.
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!
Hey, can you also please make a tutorial on how to uninstall all the installed packages with this method. Because i cant seem to find any tutorials online. Thank you
At first I thought It didn't even after doing the steps correctly but the problem that I was encountering was at 06:08 the complilers rather than clicking the one with g++ I was instead clicking cpp.exe thanks for the help this almost took 1 week to figure out
I have an error earlier regarding in the command prompt that say the g++ etc. cannot be found or something error. If you used the default path in installing the MinGW-w64 toolchain. you can copy paste the path C:\msys64\ucrt64\bin to your file explorer to find it (in my case the error generated because i install it in D: instead of C:) I go to the edit system environment setting again, < Environment Variables < New < Variable Name: Path < Variable value: (paste the path of where the files of MinGW-w64 is installed, in my case it is in D:\msys64\ucrt64\bin). then hit enter and exit the setting after its done. Then go to the command prompt (someone said run it as administrator so i did), then try to run the commands: g++ --version, gcc --version, and gdp --version. then it should be running now.
Nice explanation, only thing which I cannot figure out is how to remove or block these redundant warning or commands in the output section like I just want to see my output and nothing else ?
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!
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 :)
my problem right here, life saver
ive been trying to fix this problem all day when all i had to do was restart my computer, thank you
your a life saver, its 5:35am and im so tired of trying to get this thing to work
You actually only need to close all VSCode windows so that the Path changes take effect.
Is there an error like this
The preLaunchTask 'C/C++:gcc.exe build active file' terminated with exit code -1 ?
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.
same here! all possibilities ! really well explained, well done man!!!
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 ! 😊
The only tutorial that actually worked for me! Thank you!!
The other ones 😞. They are really useless
@@MrThaboMaleke Yea
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.
brother, my compiler is still not working properly could you please help me
@@shuaibakhtar5333 Uninstall everything and go through harry's guide
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.
I've been looking for a video like this. I always struggle to compile but now, it's not a problem. Thank you!
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.
it still doesn't work
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
Instead of pasting it on path of user variable, paste it on path of system variable
thank you it worked after doing as u said@@vinamrajeet
THIS WORKED TYSM
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.
Which step are you failing at?
@@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
@@KennyYipCoding same, when i run there's no "C/C++ :g++.exe build and debug active file"
@@KennyYipCoding yeah me too i try that for three times
@@farisraid7588 Try restarting vs studio
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.
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.
I love you. I have spend AGES doing this and this finally worked.
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!!!
Thank you very much for uploading this to the point tutorial! I could get cpp running in one go :)
just saw your linkedin you're from IISER Pune 👀 (you're smart af)
i have constantly failed in installing c++ in visual studio but today i managed to thanks to your video
incredibly greatful for such a nice simple put tutorial!!! Very straight to the point! love it, thanks a ton:D
This is so well-made, thank you!!
Subscribed, keep up the good work
I done installation within few minutes.I've been looking for a video like this.thanks a lot!!
I received the following errors when running it:
Errors:
The preLaunchTask 'C/C++: gcc.exe build active file' ended with exit code -1.
Compilation completed with errors.
* The terminal process ended with the exit code: -1.
* The terminal will be reused by tasks, press any key to close it.
Solution in this case:
The solution was to follow the Visual Studio Code documentation for C++, reinstall the extension package and choose this "Choose C/C++: g++.exe compiles and debugs the active file from the list of compilers detected on your system."
I had previously chosen cpp.exe and it did not work.
After that everything works correctly
I hope they work
And thank you very much for the tutorial Kenny!
After 3 attempts, it worked out. Thanks for sharing
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. 🔥
finally someone who goes over everything, spent two hours trying to figure this out, thank you!
You saved me after 4 hrs of trying to run my code and facing problems thanks 😂
Hi I have a question, so I followed ur vid and tried the part where I run the build and run the hello world code, when I ran the code an error appeared saying launch: program 'C:\C++\test.exe' does not exist. How do I fix this?
Me too the same problem ! , i tried a right clik and run code it work perfectly 👌🏽 , but when i try his method to run the code it happen the same problem i don't know why 🤷🏼♀️
Any way 😅 the code works perfectly when i made Ctrl+Alt+N
I had the same issue but apparently the problem is that when running the program I was choosing C/C++:gcc.exe instead of C/C++:g++.exe
@@sofiaholguinjimenez5657 thanks bud this worked for me too, though the first time i ran it my antivirus detected it as a trojan lol.
Have resolved the issue?
I still have the same problem,do anyone knows how to solve it?
fianlly someone who goes through all the steps one by one, thank you
Thanks very much. You really helped me a lot.
Very simple and straight-to-the-point video.
Thanks a lot once again.😊
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.
I have one problem with VSCODE. When i run the code, an error appears "performing the preliminary task "C/C++: gcc.exe the build of the active file is " completed with exit code -1". in the "problems" is written package.json / You should not use the "*" activation, as it affects performance. How to solve this problem?
please tell me if you'll find an answer
Same problem for me
Damn no one has shared a solution yet??? 😭
the simpilest and the easiest tutorial of running c++. Thanks alot
I have a problem with launch.jackson please help
me too
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!
What should I do,if when I try to run code it goes out there " launch: program doesn't exist"
even I faced the same problem.
@@joyeetabose5605 You need to install "code runner" extension
@@joyeetabose5605 Did you fix it?
@@joyeetabose5605what to do now???
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
it's not working from the very first line with "#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (D:\Other\theSigame
andom stuff\Valorant-TriggerBot-main\val trigger\val_trigger\vt\tests.cpp).C/C++(1696)"
same bro
uninstall valorant
@@acombo I never installed it in the first place
for me it wasnt the first one that showed up. make sure you press the one that has g++.exe not gcc.exe. that fixed it for me
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 .🥰🥰🥰💗💗💗
I have a problem which says launch problem does not exist... I did everything the same way you did and there is an error about text.exe. I am not sure what it is exactly, because I am still pretty new to coding.
same, haven't found the solution yet
Worked in my case finally I am using vs code thankyou bro.
3:45 what to do if it show me message like this " 'gcc' is not recognized as an internal or external command,
operable program or batch file" i did everything just like in the video but it doesnt work
Check if you added the path correctly, make sure you pressed enter and then pressed ok, happened to me too
@@daspooff i will check but im almost 100% sure i did it right
thx dude it worked
trying since yest but finally able to run my prog with help of the clear instructions you have provided on this video , Thank You !
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)
Thank you lol
I have been trying to get this program to run correctly, and after tons of tutorials without success, yours worked perfectly. Thanks a lot!" :)
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.
Could you solve this issue? It happened to me as well...
Try selecting g++.exe when running instead of gcc.exe. That worked for me
THANK YOU , NOW I CAN HELP *_MURIAL_* with by coding the *Computer* !!!
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.
Fantastic tutorial, was searching through a few videos to get started on c++ and this one was the best
Thanks for the video, finally i was able to set up c++ in Visual Studio Code!!!)))
hey yoo,it says launch: program'c:\user\vichy\test.exe' does not exist d
open 'launch.json'
Did you get it to work?
@@projaguar6417 yeh man
How? im still trying to work it out@@Vishnu-fz5zq
@@Vishnu-fz5zq how, whats the fix?
how to fix it???
you are my new instructor for C++
helpful and to-the-point thanks for this!
the best video i have ever watched . you explained this in detail and clearly thank you.
I get this error when I try to run debug: "The preLaunchTask 'C/C++: g++.exe build active file' terminated with exit code -1."
you ever find a solution?
The solution is at 6:08 he tells you to use the first option. Sometimes the right option for users is the second one based on how they're ordered. Mine were named exactly the same, but one gave me the error and the other didn't.
THANKUU THIS IS THE ONLY VIDEO THAT WORKED FOR ME ID BEEN TRYING FOR SOO LONGG
it still says "'gcc, g++ or gdb (i tried them all)' is not recognized as an internal or external command,
operable program or batch file."
why wont this work?
Check if you added the path correctly
Thank you so much for your help in setting up my Visual Studio Code. Your guidance made the process so much easier.
My command prompt is showing that " gcc is not recognized as an internal or external command" ......I cant diagnose the problem...
still need help?
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.
the code to be copied from the vs code dowload site for c++ as mentioned in this video doesnot work in my laptop i have tried several times and it just says command not found when i try to run in msys2.
can anyone help me?
thank you bro I installed g++ and couldn't know why it wasn't working you're a life saver ❤❤
Hello Kenny, thanks for your video, i'm having a problem when i want to run my codes whenever i want to run it, it sends me into my terminal's output section and says "'scriptcs' is not recognized as an internal or external command, operable program or batch file." can you help with this?
thank you for the video. took me like a hour trying to figure this out
I am having a problem at the last step where you are supposed to run the program. It says " Launch: Program (then the location in where the file is supposed to be) does not exist" Is anybody else having the same problem?
same here i have it too, i followed the video step-bystep but it still hasn't worked
@@mjmrvll Make sure you are in the same directory with the c++ file. And make sure file path to the c++ file does not include blankspaces or non-english characters. File names especially
@@punkie7793 it's working now, i just pressed Ctrl + Alt + N
@@punkie7793 what do you mean same directory with the c++ file?
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!
I get an error that says: "cl.exe build and debug is only usable when VS Code is run from the Developer Command Prompt for VS."
same.
love this vid! i tried to code in vscode since 1 month ago but vscode can compile the coede and no it worked! tysm
i mean, it works but for some reason the #include keeps getting an error
@Random_Edits-rx3cb well, i mean it still works, doesnt it?
@@itscloudy9246 I have the same. Were you able to find a solution to the problem?
Finallyyy this worked after watching so manyy tutorials 😊
Thanks
How can it be so hard to set up a C++ compiler in 2024 😩
For real, it sucks!
use vs community
Frr 😭😭😭😭
@@mijixiiistupid foid! Keys without the e
The article helped me put C++ into my VS Code. Thanks!
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.
Thank you for saving me
where do i find this workspace folder?
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.
Thank you for commenting this. Ive been trying to figure it out for months
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!
Hey, can you also please make a tutorial on how to uninstall all the installed packages with this method. Because i cant seem to find any tutorials online. Thank you
Should be in your control panel if you’re using windows
@@KennyYipCoding Going to control panel and selecting uninstalling Microsoft Visual Studio doesn't completely uninstall the program though.
Cristal clear, outstanding!
Doesnt work for me. Says launch program does not exist
same, ive tried uninstalling and then installed, yet this issue persists
Thank you so much! A try a lot of videos and always struggeles in running C and C++ code . Regards👏💯
At first I thought It didn't even after doing the steps correctly but the problem that I was encountering was at 06:08 the complilers rather than clicking the one with g++ I was instead clicking cpp.exe thanks for the help this almost took 1 week to figure out
lmao I did the same thing😆im so dumb
One of the best guides available, it was easy and fast. tysm bro
what about java and c++ both it is giving errer it is compiler with json the c file
Thank you so much bro.
Better than all other channels.
my #include is underlined red and says Please update your includePath. is there anyway i can fix this?
Straight to the point thanks a ton!
doesnt work
I’ve seen a bunch of videos trying to run VS but without any results thanks to kenny for this amazing video ❤
0:18 I'm color-blind. I cannot tell them apart.
I watched so many tutorials but this one worked thanks 😊😊
I have an error earlier regarding in the command prompt that say the g++ etc. cannot be found or something error.
If you used the default path in installing the MinGW-w64 toolchain.
you can copy paste the path C:\msys64\ucrt64\bin to your file explorer to find it (in my case the error generated because i install it in D: instead of C:)
I go to the edit system environment setting again, < Environment Variables < New < Variable Name: Path < Variable value: (paste the path of where the files of MinGW-w64 is installed, in my case it is in D:\msys64\ucrt64\bin). then hit enter and exit the setting after its done.
Then go to the command prompt (someone said run it as administrator so i did), then try to run the commands: g++ --version, gcc --version, and gdp --version.
then it should be running now.
Thanks, this worked for me
thx the gcc, gdb and g++ worked for me after i did it :)
also its gdb and not gdp if its not working👍
works for me finally tysm
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.
omgg tysm!!! such a great and comprehencive guide!
doesnt work ;/
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
bro this video was awesome! fast and easy been using visual studio but I'm so comfortable with VScode so thanks bro! subbed
Best guide that worked for me, thank you
Perfectly running after your tutorial thanks.
it works thanks men keep up the good work
THANK YOU SO MUCH YOU HELPED ME A LOT!
Thank you so much. I've been wanting to learn c++ for a while now but never got the C++ to run 🙏
Nice explanation, only thing which I cannot figure out is how to remove or block these redundant warning or commands in the output section like I just want to see my output and nothing else ?
Thank you my friend, helped alot. All the best! 🙏
Thank you so much! Very Helpful!
Thank you so much for a easy and clean guidance.👍