C++ Environment Setup

C++ Environment setup:


Turbo C++

The compiler used for C++ language is called Turbo C++. It is the implementation of Borland International for C++ language. Turbo C++ also provides a complete integrated development environment (IDE) known as TC editor. It is used to create, edit and save programs. It also provides a powerful debugger. The debugger helps users in detecting and removing errors in programs.

The process of installing the Turbo C++ is very simple. It can be downloaded from filehippo.com .

The steps for installing turbo C++ are as follows.

  1. Open the link com from google on your browser.
  2. There is a search option on the website; type Turbo C++ and click enter as shown:turbo-c++
  3. After this, there will appear the result of your search. Click on the download button.click-on-the-download-button
  4. Now click on the download latest version button as follows.download-latest-version
  5. Your download will be started.download-will-be-started

Creating and editing programs in turbo C++

The process of writing C++ program is known as editing. This process includes writing, modifying and deleting program statements. The part of turbo C++ IDE that is used to write C++ program is called edit window. A new edit window can be opened by selecting FILE>NEW option from menu bar. The edit window appears as follows:

The edit window has a doubled lined border. The cursor blinks in the window. The position of the cursor indicates the starting point to write the program. The user can expand the window by clicking the arrow in the upper right corner. The user can also select Window > zoom to expand. The vertical and horizontal scrollbars are used to navigate through the program.


Saving a program

  1. Select FILE>SAVE or press F2 key. The save file as dialog box will appear. The default name NONAME00.CPP appears in the dialog box.saving-a-program
  2. Enter the file name.
  3. Enter the path to save the file.


Compiling the program

The process of converting a source to object code is compiling. The following procedure is used to compile a program.

Select Compile> Compile or press ALT F9 key. The program will be translated into object program if it contains no error. The compiler will generate error message if the program contains any error.


Linking a program

The process of linking the library files with object program is known as linking. These files are used to accomplish different tasks such as input/output. A library file must be linked with the object file before execution of the program. A program that combines the object program with additional library files is known as linker. It is a part of C+++ compiler.

The linker generates error message if the library file does not exist. A new file is created with .exe extension if the process of linking is successful. This file is known as executable file. The linker can be invoked in Turbo C++ by selecting Compiler>link from the menu bar.


Executing a program

The process of running an executable file is known as executing. The C++ program can be executed after compiling and linking. The program must be loaded into the memory to execute. A program that places an executable file in the memory is known as loader. The program can be loaded in the memory by selecting Run> Run from menu bar or pressing CTRL + F9.

The screen flickers for some time when a program is executed. The output screen displays the output of the program and disappears. The user can display the output screen by selecting Window > User screen or pressing ALT + F5.