Pages

C++ Compiler & IDE

What is Compiler?

A compiler is a software program that convert high-level source into a low level object code in machine language. The process of converting high-level language into machine language is known as compilation.


The processor executes object code, which indicates when binary high and low signals are required in the arithmetic logic unit of the processor.

Explain
C++ is high-level language. A high-level programming language understandable by us humans. Its words and phrases similar to English or other human language. But a computer does not understand high-level programming language that ate readable for human. Computer understands only binary language that are based on 1’s and 0’s, it is called the machine code.


A program written in high-level programming language is called a source code. If we want to convert source code into machine code then we need a Software, called compiler or Interpreter that convert high language to machine language


What is Difference between Compiler and Interpreter?

Compiler
Interpreter
Techniques
Convert entire program to machine language
Convert program one statement at a time into machine language
Examples
C / C++ languages use compiler
Ruby , Python, Basic use Interpreter
Speed
Compiler is Faster than interpreter
Interpreter is slower than compiler
Debugging
Errors check on Entire program
Errors check on Line By Line of program generated
Memory
More memory due to object code is generated
Use less memory due to no intermediate object code  

A compiler executes four major steps:

Scanning: 
In Compiler scanner phase, it reads one character at a time from the source code and keeps track of which character is present in which line.

Lexical Analysis: 
In Compiler Lexical Analysis phase, it converts the sequence of characters that appear in the source code into a series of strings of characters known as tokens.

Syntactic Analysis: 
In Compiler Syntactic analysis phase, it is performed, which involves preprocessing to determine whether the tokens created during lexical analysis are in proper order as per their usage.

Semantic Analysis: 
In Compiler Semantic Analysis or context sensitive analysis is a process in compiler construction, usually after parsing, to gather necessary semantic information (Semantic analysis is the task of ensuring that the declarations and statements of a program are semantically correct) from the source code

     There are following top Compiler list for C++.
  •      Borland C++ / Turbo C++ [Old and most popular IDE]
  •      Visual C++ [Microsoft Platform]
  •      Dev C++
  •      GCC
  •      Eclipse



<< Difference C Vs C++         --         C++ Installation >>