0

im learning c++ and ive just set it up on vs code and as soon as i run it says 'g++' is not recognized as an internal or external command, operable program or batch file. i went to cmd and checked the gcc version and it said gcc (GCC) 9.2.0 so im a bit lost on what the issue is can someone help

acraig5075
  • 10,588
  • 3
  • 31
  • 50
rocks2260
  • 11
  • 4
  • is g++ in your path? check https://www.google.com/search?q=vcod+g%2B%2B+not+recognized+site:stackoverflow.com – alle_meije Apr 28 '21 at 07:30
  • So `gcc --version` works, but `g++ --version` doesn't? That is odd. Usually `g++.exe` is in the same directory as `gcc.exe`. – TonyK Apr 28 '21 at 12:27

2 Answers2

1

You need to add it to PATH in your Window System Variables.

Szabó Áron
  • 185
  • 1
  • 4
0

Go to advance setting in your pc control panel->set path to your g++.exe path->save it run command again