Data structure

Data Structure Environment Setup

Data Structure Environment Setup

For running the programs of data structure, we need to set up an environment for a programming language. Text Editor and C compiler are the tools for setting the environment. 

Text Editor: The editor is used to writing the programs. Different types of editors are used in different environments of operating systems. The versions of the text editor differ on the different operating systems. Example. Notepad works on windows and vim, or vi is used for windows as well as Linux or UNIX. A text editor is useful for almost all programming languages. So, for working with data structure, knowledge of at least one programming language is important. The files which we create in the editor are called source files. Source files are human-readable form and for executing it compiler is important. Different types of languages use a different compiler. According to our programming language, we use the compiler.

C compiler: C compiler works for executing the source code written in C language. The compiler is used to convert the source code into machine language so that the CPU could execute the program according to the instructions. There are various types of compilers available for C and C++ such as;

For Windows:

  • Turbo C++
  • Borland C++
  • Dev C++
  • Visual C++
  • Intel C++

               For Linux:

  • Open64
  • GNU Compiler Collection
  • Intel C++ Compiler PE

               For Mac:

  • Apple C++
  • Sun Studio
  • Cygwin (GNU C++)
  • Digital Mars C++

 but mostly used and the freely available compiler is GNU C/C++. GNU supports both the C and C++ languages. There are also different compilers of Intel, Oracle, or Solaris. Anyone can choose it according to their choice and operating system. 

 Installation of GNU C/C++ compiler on various operating systems:

  • Installation in UNIX/LINUX:

In Unix/Linux operating System command is used. So, following command is used for checking that GCC compiler is installed or not;

$ gcc -v

If GCC is not installed on the Linux system then we need to install it by ourselves using the below instructions. 

http://www.gcc.gnu.org/install/

  1. Installation in Mac OS: GCC compiler in Mac OS is installed by downloading Xcode development environment from Apple’s website. The GNU compiler for C/C++ is set up after Xcode is set up.

      The link to install Xcode is developer.apple.com/technologies/tools/

  1. Installation in Windows

MinGW needs to be installed, to install GCC on windows. MinGW can be installed from the website www.mingw.org, following the link to the MinGW download page. The latest version of the MinGW installation program needs to be download, and should be named MinGW-<version>.exe.

While installing MinWG, at a minimum, we must install gcc-core, gcc-g++, binutils, and the MinGW runtime. To install more, bin subdirectory is added to the MinGW installation to the PATH environment variable so that the tools can be specified by their names on the command line.

Once the process of installation is complete, the GNU tools like gcc, g++, ar, ranlib,  and several other GNU tools can be run from the Windows command line.

                   Installation of Turbo C++ Compiler:

                   Step 1: Download the Turbo C++ compiler from the link given below: 

                   https://www. turboc.codeplex.com/downloads/get/1489512

                   Step 2: If you have any already existing "Turbo C++" version install on your computer, then                 

                                Uninstall it.

                   Step 3: Extract the compiler you have downloaded now, i.e., "Turbo C++ 3.2.zip" file.

                   Step 4: Run the "setup.exe" file.

                   Step 5: Select the location where to keep the compiler