C++ Installation and setup

C++ Installation and setup: Before starting and going deep into the C++ program, let us know about the C++ installation and setup for compiling and executing the programs.

C++ Installation and Setup

Nowadays we can see that C and C++ both come with an integrated package form, which helps for both the languages.

Compiler in C++

A compiler is nothing but transferring the source code into machine language. i.e binary(0, 1). It will help the computer software to understand our programming language by converting it to the machine level language.

List of C++ Compilers

For Windows:

  • Turbo C++
  • Microsoft Visual C++
  • Borland C++
  • Code:: Blocks

For Linux:

  • g++

For Mac OS:

  • Apple XCode
  • C++ code::Block

C++ Compiler Installation on Windows

For using C++ compiler, we can install any of the above software. But if you install Turbo C++, it will help you to run both C and C++ code.

  • First Download the Turbo C++ software from http://www.mingw.org/.
  • And now create the turboc directory in C drive and extract the downloaded file turbo C++ in c:\turboc directory.
  • And now double click on the install option located inside the c:/turboc.
  • Then you will be getting a message that is you interested in installing the software. Click on the enter to install.
  • Now change your drive to c, so press c.
  • And then press enter, it will display c:\turboc directory for the required files.
  • Then select start installation hitting the down arrow key.
  • Then click on the “tc” application located inside the c:\TC\BIN directory to write C program.

C++ Compiler Installation on UNIX\Linux

If you want to install the Software on Unix/Linux GCC compiler is already installed in your system. If you want to check whether it is installed or not use the command as follows

 $  gcc  -v

If you feel like it is not installed then download it from gcc.gnu.org/install.

C++ Compiler Installation on Mac

If you are using the Mac software we can download the Xcode software from Apple website, to use GNU C/C++ compiler. You can get the software from developer.apple.com