Table of Contents
C++ Compiler & IDE
What is a Compiler?
A compiler is a software program that converts high-level source into 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.
C++ is a high-level language. A high-level programming language understandable by us humans. Its words and phrases similar to English or another human language. But a computer does not understand high-level programming language that ate readable for a human. The computer understands the only binary language that is based on 1’s and 0’s, it is called the machine code.
A program written in the 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 the Difference between Compiler and 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||The compiler is Faster than an interpreter||The interpreter is slower than the compiler|
|Debugging||Errors check on Entire program||Errors check on Line By Line of the 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:
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.
In the 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.
In the 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.
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++