Introduction
of C++
C++ is a powerful, general-purpose programming language that was developed by Bjarne Stroustrup at Bell Labs in the early 1979 ( First release 1985).. It is an extension of the C programming language with additional features, including object-oriented programming (OOP) capabilities. C++ is widely used in various application domains, such as system software, game development, embedded systems, high-performance computing, and more.
Some of the features & key-points to note about the
programming language are as follows:
· Simple: It is a simple language
in the sense that programs can be broken down into logical units and parts, has
a rich library support and a variety of data-types.
· Machine Independent but
Platform Dependent:
A C++ executable is not platform-independent (compiled programs on Linux won’t
run on Windows), however they are machine independent.
· Mid-level language:
· Rich library support: Has a rich library
support (Both standard ~ built-in data structures, algorithms etc.) as well 3rd
party libraries (e.g. Boost libraries) for fast and rapid development.
· Speed of execution: it is blazing fast.
· Pointer and direct
Memory-Access:
C++ provides pointer support which aids users to directly manipulate storage
address. This helps in doing low-level programming (where one might need to
have explicit control on the storage of variables).
· Object-Oriented: One of the strongest
points of the language which sets it apart from C. Object-Oriented support
helps C++ to make maintainable and extensible programs. i.e. Large-scale
applications can be built. Procedural code becomes difficult to maintain as
code-size grows.
· Compiled Language: C++ is a compiled
language, contributing to its speed.
Applications of C++:
C++ finds varied usage in applications such as:
· Operating Systems &
Systems Programming. e.g. Linux-based OS (Ubuntu etc.)
· Browsers (Chrome & Firefox)
· Graphics & Game
engines (Photoshop, Blender, Unreal-Engine)
· Database Engines (MySQL, MongoDB, Redis etc.)
· Cloud/Distributed Systems
Difference between Procedural Programming and Object Oriented Programming:
Procedural
Oriented Programming Object Oriented Programming
In procedural programming, program In object oriented programming, program is divided
is divided into small parts called functions. into small parts called objects.
Procedural programming follows
top down Object oriented
programming follows bottom up approach. approach.
There is no access specifier in procedural Object oriented programming have access
programming. specifiers like private, public, protected etc.
Adding new data and function is
not easy. Adding new data
and function is easy.
Procedural programming does not have any Object oriented programming provides data hiding so proper way for hiding data so it is less secure. it is more secure.
In procedural programming,
overloading Overloading
is possible in object oriented
is not possible.
In procedural programming,
function is In
object oriented programming, data is
more important than data. more
important than function.
Procedural programming is based
on Object oriented
programming is based on real world.
unreal world.
Examples: C, FORTRAN, Pascal,
Basic etc. Examples:
C++, Java, Python, C# etc.
Most Popular C++ Compilers
o
#7) GCC
o
#8) Vim
Compilation Process
0 Comments