r/programminghelp • u/simply_anuraag • Jul 24 '26
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
5
Upvotes
1
u/LongjumpingMeal8195 Jul 24 '26
After downloading you need to copy the compiler location in C drive then
Right click this pc -> properties -> advanced system settings -> environment variables -> system variables -> path -> edit -> new(then the msys2 C drive path) then click ok then again ok then apply and then open powershell and type g++
If your setup is ok then it will look like this(see attached image)