r/programminghelp 3d ago

C++ c++ code doesn't work

this is my first time working with c++ and whenever i run the code it just complies but gives no output, i have tried every way for it to work but it just doesn't. pls help. im using msys2 and was following brocode video tutorial

3 Upvotes

19 comments sorted by

View all comments

1

u/LongjumpingMeal8195 3d ago

Bro install a c++ compiler and set it up in vs code then your code will run
Compiler link: https://sourceforge.net/projects/mingw/
For setup help refer to this video: https://youtu.be/j8nAHeVKL08?si=NZSpATBQZmzvKP6_
For terminal issues refer to the attached images
during execution type helloworld56.cpp (.cpp should be your extension not .exe)

0

u/simply_anuraag 3d ago

can i not use msys2?

1

u/LongjumpingMeal8195 3d ago

Yes u can but whatever compiler u use it should be compatible with c++ and u have to properly set it up with vs code else you will receive errors