info@tutsfinder.in



Environment Setup


For running a C++ program, all you need to have a notepad and a compiler. There are various compiler in today’s market GCC, MinGW and you can also use IDE’s such Visual Studio, Blocks.

Text Editor – Text editor is used to edit a plain text, we can write our C++ code in text editor,the file in a text editor is our source file that can be executed by the compiler to convert it into machine language. Some text editors are notepad++, sublime text.

Compiler – C++ compiler is used to convert our source file into machine language code.

Original C++ program is source code and the resulting code will be object file.

Compiler is itself a computer program . Examples of compiler are – GCC, MingGW.


How to install in Linux –


To install GNC C/C++ compiler in linux you have to follow this command -


sudo apt install g++
sudo apt install build-essential

How to install in windows –


To install compiler on windows, first go to official website of MinGW and click on download button.

After successful installation check the version of your compiler with the following command –

gcc --version

you will get this output


gcc (tdm64-1) 5.1.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.