How to run C++ Program in Visual studio code tutorial | Download and Setup C++ in VS Code 2024

Sdílet
Vložit
  • čas přidán 1. 08. 2023
  • In this video we will how to setup and run c++ program in visual studio code
    #cppprogramming #vscode
  • Věda a technologie

Komentáře • 283

  • @dannyarreola8134
    @dannyarreola8134 Před 5 měsíci +9

    After 2 days of so many different tutorials this one was the one that worked with no errors or anything of the sort, thanks man I appreciate your work here

  • @bratqsmeazsum
    @bratqsmeazsum Před 7 měsíci +1

    Thank you! The first tutorial after which I actually didn't receive compiler errors and managed to run the C++ code successfully.

  • @_Q_A_
    @_Q_A_ Před 5 měsíci +1

    Thanks so much pro i was suffering because none of any tutorials on the internet is working for me but your tutorial is the only one working and you are straight to the point and making it easy thank you so much bro

  • @ghigopigo8317
    @ghigopigo8317 Před 9 měsíci +19

    After hours of getting weird compiler related errors I uninstalled everythig and started from scratch with this tutorial and now it works. Thank you very much!

  • @jonathanroiagarrado4800
    @jonathanroiagarrado4800 Před 7 měsíci +1

    Straight to the point and clear! Your tutorial was so much more helpful than all the other articles I tried following. Thank you so much!

  • @matidzek1227
    @matidzek1227 Před 4 měsíci

    First guide that worked for me, thank you a lot!!! Saving my life for CS class

  • @user-bg3dd9kw8l
    @user-bg3dd9kw8l Před 8 měsíci

    Its simple and clear, Thank you very much!!!

  • @EXEOP-lo5yl
    @EXEOP-lo5yl Před 8 dny

    Thank you so much am struggling to download like this from an whole week.. Thanks a lot buddy

  • @Mr.Harish1203
    @Mr.Harish1203 Před 6 měsíci

    I was searched about it a lot of times, I wasted lot of times but you shown amazing way , congratulations

  • @ProteusWasTaken
    @ProteusWasTaken Před 8 měsíci

    You're the goat, thank you!

  • @shavebunny
    @shavebunny Před 5 měsíci

    Ty, works perfectly. I thought it was some problem in VScode

  • @Shashikant-ig8fy
    @Shashikant-ig8fy Před 4 měsíci +1

    thank for this much helpful video
    With ur help i am able to run my first c++ program 😇😇

  • @mikanynatsume5037
    @mikanynatsume5037 Před měsícem

    After 4 hours I finally found a solution that works! thanks!

  • @agniva98
    @agniva98 Před 9 měsíci

    Extremely helpful and informative video. Thank you very much

  • @emilianocandelaria3322
    @emilianocandelaria3322 Před 7 měsíci

    Im rlly thankfull 4 ur video

  • @user-uw7uj3pm5g
    @user-uw7uj3pm5g Před 6 měsíci

    really thanx I can't believe
    it's working !!

  • @dakha1230
    @dakha1230 Před 8 měsíci

    finally i have done the insulation :>> thank you bro :3

  • @user-so6qt4vm3r
    @user-so6qt4vm3r Před 8 měsíci

    Greatest video on this topic i have ever seen❤

  • @Ultimate_Xenon
    @Ultimate_Xenon Před 4 měsíci

    Very veey helpful sir, finally got my first program output thanks to you

  • @stormdest92
    @stormdest92 Před 8 měsíci +1

    thank you for keeping it simple

  • @stingray1342
    @stingray1342 Před 6 měsíci

    Thank you for precise tutorial bro!

  • @brice1841
    @brice1841 Před 7 měsíci

    A Big Thanks!

  • @bubblegum6947
    @bubblegum6947 Před 8 měsíci

    Thankyou this tutorial is very helpful and easy 👍🏻♥️

  • @invent4.0
    @invent4.0 Před 5 měsíci

    this video was so good now c++ is working for me

  • @Pratiksha-lj2dr
    @Pratiksha-lj2dr Před 4 měsíci

    Thank you so much!

  • @adityagaur3206
    @adityagaur3206 Před 5 měsíci

    thanks man..✌ you are real life saver:)

  • @digitalcoding4271
    @digitalcoding4271 Před 6 měsíci

    thank you so much tomorrow is my submission n i have run dsa code in c++

  • @user-th2jb9vb8e
    @user-th2jb9vb8e Před 7 měsíci

    Thanks dude, your explanations are great

  • @user-yd8bb1lx2x
    @user-yd8bb1lx2x Před 4 měsíci

    Thankyou so much sir 😊😊 it's working 👍👍👍

  • @ananyasiingh21
    @ananyasiingh21 Před 5 měsíci

    Best ever tutorial ❤

  • @lsgallery09
    @lsgallery09 Před 5 měsíci

    thanks a lot bro ❤

  • @gridpaper2980
    @gridpaper2980 Před 9 měsíci

    Thank you for this

  • @sayandh-cz6qo
    @sayandh-cz6qo Před 4 měsíci

    thanks for the help

  • @msg1956
    @msg1956 Před 6 měsíci

    Excellent..!

  • @strawcherru
    @strawcherru Před 5 měsíci

    thank you very much

  • @user-ib5pe2cc2h
    @user-ib5pe2cc2h Před 2 měsíci

    Thanku it worked😀

  • @bobbypoddar-kr5id
    @bobbypoddar-kr5id Před 8 měsíci

    ❤thank you bhai mai 3,4 din se preshan tha isko lekar

  • @aayansethi3577
    @aayansethi3577 Před 6 dny

    Best tutorial!!!

  • @shinobi9251
    @shinobi9251 Před 8 měsíci

    Thank you soooo much❤️❤️❤️❤️❤️

  • @VantomChannel
    @VantomChannel Před 7 měsíci

    that first "Hi" caught me off guards.. sheesh xD.. Great job though

  • @rajkadam1950
    @rajkadam1950 Před 9 měsíci

    Finally got C++ up and running now, took almost 2 days LOL !!

  • @jeevankurian9148
    @jeevankurian9148 Před 6 měsíci

    So much helpful, was getting lot of compiler errors

  • @AltKaizey
    @AltKaizey Před 8 měsíci +1

    Thank you broski

  • @Ayazkhan-cr7wv
    @Ayazkhan-cr7wv Před 3 měsíci

    Tysm sir ❤️

  • @magnetic_monopole
    @magnetic_monopole Před 8 měsíci

    thank you very much😊

  • @Rihabzz.
    @Rihabzz. Před 6 měsíci

    on point

  • @hharpit4423
    @hharpit4423 Před 4 měsíci

    Well explained

  • @nikhil9976
    @nikhil9976 Před 6 měsíci

    Thank you

  • @ngawangtsetan1637
    @ngawangtsetan1637 Před 2 měsíci

    Very helpful,

  • @SigmaMindset-hw3ql
    @SigmaMindset-hw3ql Před 9 měsíci

    Thanks man

  • @user-ck9oz7qh1m
    @user-ck9oz7qh1m Před 8 měsíci

    Thank you Very much

  • @hoangvu_2004
    @hoangvu_2004 Před 7 měsíci

    thanks you sir.

  • @nimaalikhah9047
    @nimaalikhah9047 Před 8 měsíci

    Thank you so much sir

  • @mannatkumar294
    @mannatkumar294 Před 7 měsíci +1

    One thing I have to say i tried so many times but I can't make it possible after watching your video in first try it is done.

  • @shaikyunus241
    @shaikyunus241 Před 5 měsíci +1

    For me when i was downloading c/c++ extensions in vs code it says download did not complete check the log and try to download manually.not only c/c++ but i am not able to install any extension in my vs code

  • @aryawahyu8972
    @aryawahyu8972 Před 5 měsíci

    mate i’ve problems on applying changes on those mingw, i already checkedlist everything exc fortrun, and when i applied the programs just running without finished until there’s some eror notification popped up. i also installed it on D Files. can you help me mate please? Thankyou

    • @unitedtoptech6288
      @unitedtoptech6288  Před 5 měsíci

      can you check the path where mingw is installed ? if not try reinstalling it once again

  • @sike85
    @sike85 Před 5 měsíci

    goat

  • @Charlie_Mero_A7V
    @Charlie_Mero_A7V Před 7 měsíci +1

    On that command promt
    Which folder path are we looking for? (Got error)

  • @johnnyjunior6499
    @johnnyjunior6499 Před 9 měsíci

    tnx bro😇

  • @poyrazsad4068
    @poyrazsad4068 Před 8 měsíci +1

    first code ran but when i turn off the vs code then turn on again it doesnt run. what sould i do help pls

  • @Pian0ist
    @Pian0ist Před 8 měsíci +1

    hi thanks for the video,
    After downloading everything i try to compile the code, but i keep getting this error after the command ./a:
    Program 'a.exe' failed to run: Unknown error
    (0xfffffffe)At line:1 char:1
    + ./a
    + ~~~.
    At line:1 char:1
    + ./a
    + ~~~
    + CategoryInfo : ResourceUnavailable:
    (:) [], ApplicationFailedException
    + FullyQualifiedErrorId : NativeCommandFailed
    may i knwo how to solve this issue. Also when i downloaded i have this "task.json" that keeps poping up. Do I have to do anything about it? Thanks in advance

    • @unitedtoptech6288
      @unitedtoptech6288  Před 8 měsíci

      Can you try running using code runner extension?

    • @nainasingh9900
      @nainasingh9900 Před 7 měsíci

      @@unitedtoptech6288 I am also having problem in it and it is not running even with code runner.

    • @unitedtoptech6288
      @unitedtoptech6288  Před 7 měsíci

      Do you get any error when running with code runner?

  • @syedsaad6715
    @syedsaad6715 Před 9 měsíci +2

    I am getting an error in output
    It is showing unable to resolve configuration with compilerpath "C:\users\HP\Desktop\VSCode-win-x64-1.82.2\c++
    ame.cpp". Using "C: \MinGW\bin\gcc.exe" instead.

  • @AdityaSingh-vg1hl
    @AdityaSingh-vg1hl Před 2 měsíci +1

    Bhaiya i had a problem while running the program it says
    Program 'a.exe' failed to run: unknown errror (0×fffffffe) At line:1 char:1
    +Category info : resourcesUnvailable: (:) [ ], Application failed exception .
    Everything point in your video i follow very carefully still i got this i am trying to run my first freaking program from the past 5 days with errors

    • @unitedtoptech6288
      @unitedtoptech6288  Před 2 měsíci

      do you have antivirus on? try turning it off and run the program

  • @shriyashpatil7247
    @shriyashpatil7247 Před 8 měsíci

    I downloaded mingw from source forge as you said but then instead of exe, zip file got downloaded, now what can i do?

  • @Ankit2940
    @Ankit2940 Před 3 měsíci +1

    I saw tons of videos to run c++ but the only problem is the includepath everytime it shows a error to update your includepath.so please make a video .how to update includepath😢😢

    • @unitedtoptech6288
      @unitedtoptech6288  Před 3 měsíci

      I didn't get that error when I did this but I have already done a video on that

  • @howee8636
    @howee8636 Před 8 měsíci

    what to do if vscode come out this
    "'g++' is not recognized as an internal or external command,
    operable program or batch file."
    in the terminal when type g++ (program name)

    • @howee8636
      @howee8636 Před 8 měsíci

      okok it solved after i click the g++ at the search bar on the top (idk what it said what build)
      after all i made it it run successful ,thanks bro you have the easiest and straights froward tutorial

    • @unitedtoptech6288
      @unitedtoptech6288  Před 8 měsíci

      glad it worked!! Welcome

  • @hemrajjadhav2723
    @hemrajjadhav2723 Před 2 měsíci +1

    Yunterrrr
    😂😂😂😂😂😂👍👍👍👍

  • @rakshithashettigar9160
    @rakshithashettigar9160 Před 5 měsíci

    When I type g++ filename.cpp it is showing 'g++.exe: error: CreateProcess: No such file or directory' what is the mistake might be??

    • @unitedtoptech6288
      @unitedtoptech6288  Před 5 měsíci

      check if you are inside the right path in command prompt like that path should have the folder name in which your c++ file must be there

  • @questforknowledge4887
    @questforknowledge4887 Před 9 měsíci +1

    Bro i am getting /a.out file operation isnt completed because the file contains virus and my anti virus software(mcafree) giving notification stopped a virus

  • @titan__07
    @titan__07 Před 10 měsíci

    I have done the insulation..
    Thank you bro ❤
    But i am getting error in output and undefined reference in terminal

  • @mahmoudsaad6357
    @mahmoudsaad6357 Před 5 měsíci

    when i run it says this
    cl.exe build and debug is only usable when VS Code is run from the Developer Command Prompt for VS.

    • @unitedtoptech6288
      @unitedtoptech6288  Před 5 měsíci

      did you run using command or extension?

    • @mahmoudsaad6357
      @mahmoudsaad6357 Před 5 měsíci

      I pressed on the run c/c++ file
      after installing the extensions in the video exactly like you@@unitedtoptech6288

    • @unitedtoptech6288
      @unitedtoptech6288  Před 5 měsíci

      I guess you are running debug , can you check if you have any drop down near run button? else try running with command

  • @fauzanazhar1460
    @fauzanazhar1460 Před 8 měsíci

    My error said undefined reference to 'winmain@16 plss help me sos

  • @syedsaad6715
    @syedsaad6715 Před 9 měsíci

    And there is one more problem in the terminal process it is coming up like a notification at the bottom right showing
    "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
    "terminated with exit code: 2.

  • @avenasaji7073
    @avenasaji7073 Před 9 měsíci

    When I run the code I get the error as cout was not declared in this scope.Can you please explain why

  • @suman9226
    @suman9226 Před 5 měsíci

    it's showing me this when i run the code :- (The system cannot execute the specified program)

  • @vamshit116
    @vamshit116 Před 8 měsíci

    bro how to download other pakages like GTK and others??

  • @salmaben186
    @salmaben186 Před 8 měsíci

    The download of minGW won't start i dunno what's the problem

  • @teamx9361
    @teamx9361 Před 9 měsíci +1

    Hey bro i get a error in cmd promt like (g++ is not recognised as an internal or external command , operable program or batch file)

    • @unitedtoptech6288
      @unitedtoptech6288  Před 9 měsíci

      Check if you have added the right path of mingw in environment variable

    • @Akhila-wz4nv
      @Akhila-wz4nv Před 9 měsíci

      I am also having same problem.Please help me in how to solve this issue,if you solved then please explain the process

    • @unitedtoptech6288
      @unitedtoptech6288  Před 9 měsíci

      You need to add the env variable path? It worked for me I did the same

  • @FellowHindu
    @FellowHindu Před 3 měsíci

    Sir I have a problem
    It's showing program " a.exe " failed to run: unknown error (0xfffffffe) at line 1 char 1
    And more, what should I do please help

  • @Bro_Bubby
    @Bro_Bubby Před 7 měsíci

    I wish this was the first tutorial i watched before setting up. But, i have a problem, at 9:09 it keeps telling me that "g++" is not recognized

    • @unitedtoptech6288
      @unitedtoptech6288  Před 7 měsíci +1

      Can you please check if you have added the correct path in environment variable?

    • @Bro_Bubby
      @Bro_Bubby Před 7 měsíci

      Yes.
      I did that

    • @Bro_Bubby
      @Bro_Bubby Před 7 měsíci

      In the terminal, it's saying "undefined reference to 'WinMain@16'"
      "collect2.exe: error: Id returned 1 exit status

    • @unitedtoptech6288
      @unitedtoptech6288  Před 7 měsíci +2

      go to settings , search for code runner save all files before run , check it and restart vscode and try running it

    • @Bro_Bubby
      @Bro_Bubby Před 7 měsíci

      @@unitedtoptech6288 I was able to get it to work.
      I have no idea how, but it works, so I won't disturb it.
      Can you help me out now?
      I want to run a regular C++ code, and it's running, but when I want to run a code that deals with me taking inputs, when I want to take the inputs, it hangs, and when I want to re-run, it tells me "code is already running", but then I can't take inputs. What could be the problem?

  • @lilaoniram-zn2fm
    @lilaoniram-zn2fm Před 8 měsíci

    When i enter the g++ programname.cpp it says error: ID returned 1 exit status

    • @unitedtoptech6288
      @unitedtoptech6288  Před 8 měsíci +1

      Do you get any errors when you are running with code runner extension?

    • @lilaoniram-zn2fm
      @lilaoniram-zn2fm Před 8 měsíci

      @@unitedtoptech6288 it's alright now, it's just I keep debugging before running the code so that it saves before I run the code

    • @unitedtoptech6288
      @unitedtoptech6288  Před 8 měsíci

      ohh glad it worked!! who is the kpop idol on your profile pic?

  • @user-ps3rm9tp2p
    @user-ps3rm9tp2p Před 5 měsíci

    im getting errors for the #include

  • @aishwarya12731
    @aishwarya12731 Před 7 měsíci

    I'm getting g++ is not recognised as an internal or external command what to do plss help me sir

  • @emiraziz9290
    @emiraziz9290 Před 5 měsíci

    Program 'test.exe' failed to run: Access is deniedAt line:1 char:68
    + ... \Coding\C++\" ; if ($?) { g++ test.cpp -o test } ; if ($?) { .\test }
    + ~~~~~~.
    At line:1 char:68
    + ... \Coding\C++\" ; if ($?) { g++ test.cpp -o test } ; if ($?) { .\test }
    + ~~~~~~
    + CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
    + FullyQualifiedErrorId : NativeCommandFailed

    • @unitedtoptech6288
      @unitedtoptech6288  Před 5 měsíci

      try changing the filename or check if you have anti virus on, turn it off

  • @santasna1187
    @santasna1187 Před 8 měsíci

    I did every thing the same as you did but when i run my code it says:
    [Done] exit with code=1😑

    • @unitedtoptech6288
      @unitedtoptech6288  Před 8 měsíci

      Restart vscode, save your file and run it again

    • @santasna1187
      @santasna1187 Před 8 měsíci

      @unitedtoptech6288 i deleted everything and did the whole process again, but I get the same result🥲

    • @santasna1187
      @santasna1187 Před 8 měsíci

      @unitedtoptech6288 you know ,in that part, which you enter ./a and then program executes
      when I do it, it shows this error: ./a : The term './a' is not recognized as the name of cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
      At line:1 char 1
      + ./a
      + ~~~
      + CategoryInfo :Object not found: (./a:string) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
      🤦🏻‍♂️😑

    • @unitedtoptech6288
      @unitedtoptech6288  Před 8 měsíci

      Can you use code runner extension? you won't face any errors

  • @BirukT.Alehegn
    @BirukT.Alehegn Před 9 měsíci

    Why the Downloading package takes a long time🫤

  • @blahblu8036
    @blahblu8036 Před 6 měsíci

    i am getting error after writing ./a

  • @akhiljithk7173
    @akhiljithk7173 Před 6 měsíci

    i got this error, how to solve : cd "d:\C programs\" && g++ test.cpp -o test && "d:\C programs\"test
    bash: cd: too many arguments

  • @blackbird436
    @blackbird436 Před 7 měsíci

    undefined reference to WinMain@16.
    what a solution?

  • @mohammedowaisahmed786
    @mohammedowaisahmed786 Před 8 měsíci

    sir it is showing ur code has virus

  • @LaibaFatima-de6wb
    @LaibaFatima-de6wb Před 5 měsíci

    i have wasted an entire week trying to download vscode and mingw now i give up .. i know i can never succeed

    • @unitedtoptech6288
      @unitedtoptech6288  Před 5 měsíci

      What do you mean? this didn't work?

    • @LaibaFatima-de6wb
      @LaibaFatima-de6wb Před 5 měsíci

      @@unitedtoptech6288 no it did not work .currently using dev c++...😞😞😖😣

    • @unitedtoptech6288
      @unitedtoptech6288  Před 5 měsíci

      what error did you face when running in vscode?

    • @LaibaFatima-de6wb
      @LaibaFatima-de6wb Před 5 měsíci

      @@unitedtoptech6288 the c++ was not detected as a language and it gave an erroe because it said there was no gcc compiler but when i checked on command propmt it was there but vscode did not detect any compiler like gcc or g++ etc
      . i am so sad to not use vs code

    • @LaibaFatima-de6wb
      @LaibaFatima-de6wb Před 5 měsíci

      @@unitedtoptech6288 if ($?) { g++ HELLO WORLD.cpp -o HELLO WORLD } ; if ($?) { .\HELLO WORLD }
      g++.exe: error: HELLO: No such file or directory
      g++.exe: error: WORLD.cpp: No such file or directory
      g++.exe: error: WORLD: No such file or directory
      g++.exe: fatal error: no input files
      compilation terminated.

  • @ngawangtsetan1637
    @ngawangtsetan1637 Před 4 měsíci

    The best 🫡

  • @KhyatiSatija
    @KhyatiSatija Před 8 měsíci +1

    After hours of getting weird compiler related errors I uninstalled everythig and started from scratch with this tutorial and now it works. Thank you very much!