How to Install C++ Compiler in Windows

First..open up your browser..then follow what I do… Now..we’re downloading..then installing the compiler into the system… Here..take note of the installation directory…it’ll be used for creating a path into the system environment variable… For first installation..you will not be prompted as such..for me..it’s because I have already installed mine… 🙂 Here..select as what is shown… Then..click on “Apply Changes”.. Now..we’ll edit the system environment variable to ensure the compiler installed works… Click on “Environment Variables”… Here..under “System Variables”..click on “Path”..followed by “Edit”… Here..click on “New”..then enter the address installation you’ve selected earlier… After that..restart your computer… After restarting..open up CMD..here..we’re testing whether the compiler is installed correctly into the system or not… In CMD..insert ” g++ –version “..if this is prompted at your screen..it means that the compiler is correctly installed and ready to be used in your system… Now..here comes the fun part… We will try to compile and run a simple program using CMD… Here…I am copying the address of the sample .cpp file named ” hello.cpp “… Simply..” cd file address ” is to let CMD know where the .cpp file is located… Then.. ” g++ fileName.cpp ” is to compile the desired .cpp file… Here..I am dragging and dropping the compiled file for the CMD to be executed… Instead of doing this..another option is just typing ” a ” or ” a.exe ” into CMD for the last part..to execute the compiled file .cpp file… There..!..The output of the simple program…This means the installation is a success..!.. 🙂

Tags: , , , , , , , , , , , , , , , , ,

There are no comments yet

Why not be the first

Leave a Reply

Your email address will not be published. Required fields are marked *