Wednesday, March 13, 2019

Introduction to C++ programming language


Introduction to C++ programming language

Hello… A new long journey with another great programming language: C++.
 
C++ is a high-level, general-purpose, object-oriented, and compiled programming language. It was invented by Bjarne Stroustrup in 1983. Formerly known as “C with Classes”, the C++ language is considered as an extension to the C language. Although some references consider them two totally different languages, I vote against this opinion, and I have my own reasons from my personal experience. My first gate to the computer programming world was the C language. In 1997, I started learning C. The next year (1998), I switched easily and smoothly to C++. The reason for this smooth transition wasn’t because I am genius or something, but because they are really similar languages. Starting from the C language that was invented in early 1970’s, C++ was derived, and has added its own new unique features and capabilities that the ordinary C language lacks. That is why C is considered as a subset of the C++ language.
 
Another important point that deserves mentioning is that knowing C is not a prerequisite to learning C++; so you can start learning C++ directly, with no prior knowledge of C language. Cheer up!!!

Why C++?
 
Next, the normal question is asked: Why C++?
 
Well. To better answer this question, we should first know the features of the C++ language.
 
C++ is:
 
Object Oriented: C++ supports OOP. Object Oriented Programming allows modeling real life entities into programmable objects which have attributes and behavior. This addresses the limitations in the traditional programming languages.
 
Internationally Standardized: C++ is ISO standardized. In 1998, the International Organization for Standardization (ISO) had recognized C++ as 
ISO/IEC 14882. Since that date, several reviews have been made on the standard, until it reached its current release ISO/IEC 14882:2014. Being certified and standardized by a well-known organization like ISO is an important indicator that shows the wide acceptance C++ had (and still having) in the world of computer programming.
 
Firm and Strict Syntax: yes, you have read it correctly, and nothing wrong with your eyes.
 
– How could strict syntax be an advantage?! This is ridiculous!!!
 
Okay, being strict will take some effort from you in the beginning. In the learning phase, you will have to pay extra attention to avoid typing errors, unnecessary space characters, undeclared variables, etc. Once you complete the learning phase successfully, and your hands get used to writing C++ code, you will see how such strictness helps you ensure bugs-free code, and avoid unexpected execution results. You don’t believe me now. So, just wait and you will see!!
 
Very High Performance
C and C++ have great performance compare to other languages. This shouldn’t be strange when you know that the UNIX kernel was written in the C language. Could you imagine?! The kernel, which is the closest layer to the hardware, and contains the necessary drivers to manage the CPU, Memory, and I/O: How fast should this component (Kernel) be?!!
When performance is an issue, use C/C++.
 
Compiled: like its parent (C language), C++ is a compiled language. When a language is said to be compiled, this means that programs written in this language should be compiled before being executed.
 
Besides to the above features (that I really consider as advantages), learning C++ gives you another advantage if you are planning to learn Java or C#. Learning C++ will take you a long way in both languages. (Great advantage, huh!!)
 

No comments:

Post a Comment

Which Python course is best for beginners?

Level Up Your Python Prowess: Newbie Ninjas: Don't fret, little grasshoppers! Courses like "Learn Python 3" on Codecade...