C++ Installation

In this tutorial you will learn about the C++ Installation and its application with practical example.

C++ Installation

Installing C++ In Windows

In order to setup C++ Programming environment you need to have C++ Compiler installed on your system, so if you don’t have it installed, check the following instruction to get C++ installed. If you’ve already have installed C++ in your system, you can skip this part.

Step 1:- Download the turbo C++ online from any of the safe website or directly from link given below –

Download turbo C++

Step 2:- Create a folder “turboc” in c:\ Drive and extract the tc3.zip file in c:\turboc directory.

Step 3:- Now, start the installation by double clicking the INSTALL Application file in c:\turboc directory.

Step 4:- Follow the installation wizard to install Turbo C++. Press “Enter” here to start the installation.


Step 5:- Now, change or select installation directory to c:\ and press “Enter”


Step 6:- Now, select the c:\turboc directory that we have created containing required installation files, and press “Enter”


Step 7:- Now, select Start Installation using down arrow key and then press “Enter”.


Step 8:- Installation is done, press enter to read documentation and close the installation wizard.


Step 9:- Now you can begin writing a c/c++ program by starting the tc application located in c:\TC\BIN directory. This will application window as below.


Installing C++ In Ubuntu/Linux

Here is how you can install C++ in Linux –

Step 1:- Open terminal and use the following command to install C++ compiler and essential tools –

If you are on Ubuntu and Debian use following command

If you are on CentOS, Fedora and Redhat use following command

Recommended:-  C++ Variables

Step 2:- Lets verify installation using following command

Compile and Run C++ Program In Ubuntu/Linux

Step 1:- Create a file using a text editor program of your choice and save it with .cpp extension. The .cpp file extension is used to specify C++ file.

Example :-


Step 2:- Now, switch to the directory where the file is located. And, issue the following command to compile the C++ program –

Here, replace program-file-name.cpp with your c++ program file name and program-name with any name of your choice.


Step 3:- If there is no compilation error, an executable file is create and you can see the output using the following command


Installing C++ In Mac OS

Download and Install Xcode development environment to use GNU C/C++ compiler from Apple’s official website. link given below –

In this tutorial we have learn about the C++ Installation and its application with practical example. I hope you will like this tutorial.