‘c++’ not recognised as an internal or external command, operable program or batch file

ccommand lineenvironment-variables

I have recently installed MinGW for Windows, and I am wanting to compile a program named "object.cpp" at C:\Users\User\. So I open the command prompt, go to my desired directory, and type in the command c++ object.cpp. I am expecting it to return with nothing, but then I receive the error message:

'c++' not recognised as an internal or external command, operable program or batch file

I have tried Setting the Environmental Variable Path to C:\MinGW\bin; but it still comes up with the error message. What should I do to correct this?

Edit:

People have said I should use g++ It still doesn't work.

Also, in C:\MinGW\bin, there exists a c++ and g++ .exe files. So, I do not know what is wrong.

The command prompt is displaying:

C:\Users\User>c++
'c++' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\User>g++
'g++' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\User>mingw
'mingw' is not recognized as an internal or external command,
operable program or batch file.

Best Answer

The C++ compiler that comes with GCC/MinGW uses the command "g++".