How to run C++ program in command prompt

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ก.พ. 2023
  • Writing a hello world program in C++ language and compiling and executing it using Command Prompt (CMD)
    #cmd #howto #C++ #c++programming #programming
    #shorts #youtubeshorts #shortsvideo #beginner

ความคิดเห็น • 52

  • @robertchoate359
    @robertchoate359 11 หลายเดือนก่อน +23

    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

    • @coding-is-love
      @coding-is-love  11 หลายเดือนก่อน +4

      You are right!

    • @Damnerz
      @Damnerz 2 หลายเดือนก่อน

      I have it magic

  • @user-ql7pw7ld1n
    @user-ql7pw7ld1n 6 หลายเดือนก่อน +1

    So cool...I loved it

  • @pooja6487
    @pooja6487 9 หลายเดือนก่อน +1

    Thank you very much sir helped alot❤

  • @coolmc7976
    @coolmc7976 ปีที่แล้ว +5

    helped

  • @nadkoch
    @nadkoch 5 หลายเดือนก่อน +2

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

  • @AtifAhmed-67
    @AtifAhmed-67 หลายเดือนก่อน +2

    Download Dev C++❤

  • @TheTimeProphet
    @TheTimeProphet 9 หลายเดือนก่อน +16

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

    • @zenith2808.
      @zenith2808. 8 หลายเดือนก่อน +1

      Agreed

    • @pabblo1
      @pabblo1 8 หลายเดือนก่อน +2

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

    • @zenith2808.
      @zenith2808. 7 หลายเดือนก่อน +1

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

    • @GDT-Studio
      @GDT-Studio 4 หลายเดือนก่อน +2

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

    • @zenith2808.
      @zenith2808. 2 หลายเดือนก่อน

      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.

  • @camwha5904
    @camwha5904 10 หลายเดือนก่อน

    Forgot the Dreamscape music lol

  • @jakeelunker176
    @jakeelunker176 10 หลายเดือนก่อน +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 6 หลายเดือนก่อน

      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 3 หลายเดือนก่อน +1

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

  • @ulasarslan2577
    @ulasarslan2577 หลายเดือนก่อน

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

  • @HassaanNonari
    @HassaanNonari 5 หลายเดือนก่อน

    Where is return keyword for int function 😂

  • @just_the__facts
    @just_the__facts ปีที่แล้ว +9

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

    • @coding-is-love
      @coding-is-love  ปีที่แล้ว

      did you install c++ compiler?

    • @just_the__facts
      @just_the__facts ปีที่แล้ว

      @@coding-is-love thank you

    • @coding-is-love
      @coding-is-love  ปีที่แล้ว

      @@just_the__facts welcome

    • @adityaarya2
      @adityaarya2 ปีที่แล้ว

      ​@@coding-is-loveI have installed but it not recognising

    • @coding-is-love
      @coding-is-love  ปีที่แล้ว +1

      @@adityaarya2 maybe the issue is environment variable.

  • @Lilyys
    @Lilyys 8 หลายเดือนก่อน

    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 หลายเดือนก่อน

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

  • @user-cv7ws7nu4d
    @user-cv7ws7nu4d 10 หลายเดือนก่อน +2

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

    • @RidanKhan931
      @RidanKhan931 10 หลายเดือนก่อน

      did you put return 0; ?

    • @user-cv7ws7nu4d
      @user-cv7ws7nu4d 10 หลายเดือนก่อน

      yes i did .
      still don't know what to do.?!?@@RidanKhan931

  • @user-xxCATALONIA
    @user-xxCATALONIA 8 หลายเดือนก่อน

    Why explain quickly !!

  • @siddharthmeshram237
    @siddharthmeshram237 8 หลายเดือนก่อน

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

    • @pabblo1
      @pabblo1 8 หลายเดือนก่อน

      Most compiler will automatically assume return 0.

  • @drzahraa-oc5jl
    @drzahraa-oc5jl 6 หลายเดือนก่อน

    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 2 หลายเดือนก่อน

      you have to install gcc

  • @abdulmohaimin9729
    @abdulmohaimin9729 8 หลายเดือนก่อน +2

    How did it work without return 0

    • @pabblo1
      @pabblo1 8 หลายเดือนก่อน +2

      Most compilers by default assume return 0.

    • @au._.79
      @au._.79 17 วันที่ผ่านมา +1

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

  • @monlanoza7480
    @monlanoza7480 2 หลายเดือนก่อน

    🇵🇮

  • @raquelruizespejo8888
    @raquelruizespejo8888 ปีที่แล้ว +1

    ork 100%

  • @dilshadansari-vu3je
    @dilshadansari-vu3je 9 หลายเดือนก่อน

    I need help bro

  • @user-ls9yy5gm5z
    @user-ls9yy5gm5z 28 วันที่ผ่านมา

    Wrong letter
    Include iostream.h

    • @Prasuryavlogs
      @Prasuryavlogs 17 ชั่วโมงที่ผ่านมา

      No