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
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
You are right!
I have it magic
So cool...I loved it
Download Dev C++❤
Thank you very much sir helped alot❤
helped
Naughty Naughty I gave you a thumbs up, but you should never namespace STD.
Agreed
Why not? It's just a Hello World program.
Yes but it’s bad practice to do “using namespace std”
I love using namespace, it makes the code smaller and readable.
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.
Спасибо, постоянно забываю что консоль можно открыть так.
But need a compiler g++ llvm-devel and others😅
Forgot the Dreamscape music lol
it compiles for me but when I try to execute ‘a’ it says “a is not recognized as an internal or external command”
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".
The code in the video are not right..
right code
#include
using namespace std;
int main() {
cout
Where is return keyword for int function 😂
G++ is giving issues it's saying that it is not recognized as internal external command
did you install c++ compiler?
@@coding-is-love thank you
@@just_the__facts welcome
@@coding-is-loveI have installed but it not recognising
@@adityaarya2 maybe the issue is environment variable.
i followed exact same steps but i didnt go through.
why is that so?
did you put return 0; ?
yes i did .
still don't know what to do.?!?@@RidanKhan931
that window where you print the output. Mine is in dark mode. Is there a way to change it back to light mode?
Yep, go to display settings. Its been 6 months so I guess you already found it
Why explain quickly !!
How did it work without return 0
Most compilers by default assume return 0.
🇵🇮
I followed this step but the word doesn’t come it say error I don’t now why I am very confused and sad
you have to install gcc
How about return 0 since it's int main()
Most compiler will automatically assume return 0.
ork 100%
guh
never ogre
I need help bro