How to run C++ program in command prompt

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

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

  • @robertchoate359
    @robertchoate359 Год назад +32

    gcc is the compiler he’s calling the compiler to run his code. For those of you saying it’s not working you have to load MSYS and load it into your Windows environment by adding it as a variable

  • @visitor_t-w3p
    @visitor_t-w3p 9 месяцев назад +1

    So cool...I loved it

  • @pooja6487
    @pooja6487 Год назад +1

    Thank you very much sir helped alot❤

  • @TheTimeProphet
    @TheTimeProphet Год назад +16

    Naughty Naughty I gave you a thumbs up, but you should never namespace STD.

    • @zenith2808.
      @zenith2808. 11 месяцев назад +1

      Agreed

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

      Why not? It's just a Hello World program.

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

      Yes but it’s bad practice to do “using namespace std”

    • @GDT-Studio
      @GDT-Studio 7 месяцев назад +2

      I love using namespace, it makes the code smaller and readable.

    • @zenith2808.
      @zenith2808. 5 месяцев назад

      In small projects, that’s alright but when you’re doing massive or medium sized projects, using namespace std causes namespace poisoning. That is, user functions or keywords may clash with std members.

  • @coolmc7976
    @coolmc7976 Год назад +6

    helped

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

    it compiles for me but when I try to execute ‘a’ it says “a is not recognized as an internal or external command”

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

      Try doing "cd " and after a space, write the path to the directory where you saved your code.
      For example: cd Desktop/CPP
      Adjust it according to your directory. Now, write "a" or "a.exe".

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

      The code in the video are not right..
      right code
      #include
      using namespace std;
      int main() {
      cout

  • @AtifAhmed-67
    @AtifAhmed-67 5 месяцев назад +2

    Download Dev C++❤

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

    Спасибо, постоянно забываю что консоль можно открыть так.

  • @darkhunterrr-k9e
    @darkhunterrr-k9e Год назад +2

    i followed exact same steps but i didnt go through.
    why is that so?

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

    How did it work without return 0

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

      Most compilers by default assume return 0.

    • @au._.79
      @au._.79 3 месяца назад +1

      C++, by design, has an implicit return 0 in main function

  • @just_the__facts
    @just_the__facts Год назад +9

    G++ is giving issues it's saying that it is not recognized as internal external command

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

    Forgot the Dreamscape music lol

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

    But need a compiler g++ llvm-devel and others😅

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

    Where is return keyword for int function 😂

  • @drzahraa-oc5jl
    @drzahraa-oc5jl 9 месяцев назад

    I followed this step but the word doesn’t come it say error I don’t now why I am very confused and sad

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

      you have to install gcc

  • @siddharthmeshram237
    @siddharthmeshram237 11 месяцев назад

    How about return 0 since it's int main()

    • @pabblo1
      @pabblo1 11 месяцев назад

      Most compiler will automatically assume return 0.

  • @user-xxCATALONIA
    @user-xxCATALONIA 11 месяцев назад

    Why explain quickly !!

  • @Lilyys
    @Lilyys 11 месяцев назад

    that window where you print the output. Mine is in dark mode. Is there a way to change it back to light mode?

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

      Yep, go to display settings. Its been 6 months so I guess you already found it

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

    Wrong letter
    Include iostream.h

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

    ork 100%

  • @dilshadansari-vu3je
    @dilshadansari-vu3je Год назад

    I need help bro

  • @monlanoza7480
    @monlanoza7480 5 месяцев назад

    🇵🇮