Installing g++ in Windows 10
To install g++ in Windows10 and compile a c++ file. g++ is included in
What is g++?
g++ is the command to compile c++ and the name of C++ compiler included in GCC, the GNU Compiler Collection. You can use g++ on GNU such as Cygwin and MinGW.
I’ll use MinGW
Run the downloaded file.
Click “Install” an “Continue” with your preference.
Install Basic MinGW and GCC(g++).
Mark “mingw32-base-bin” and “mingw32-gcc-g++-bin” on MinGW Installation Manager.
Click Installtion > Apply Changes
Add C:\MinGW\bin into environment variables Path.
Open Command Prompt and input the command “g++ -v”.
Command to compile C++ file
You can see command line options at the die.net g++(1) – Linux man page.
Additionally install msys if you’d like to use shell with MinGW.