Friday, 15 January 2016

A basic Introduction

Welcome to the world of C++. This is one of the most used languages in the world of Computers.

Before we start anything on this topic, I would like to assume the following,

  1. You know about computer programs.
  2. You know about different form of languages.
  3. You know the basics of using a computer like using notepad to write something on it.
  4. Copy, Paste and save notepad contents.
  5. You know how to deal with the command prompt/shell.
However, if you don't know about computer programs, you can read the information in this post, Computer Programs. This post gives you an insight why a computer program exists and what is its basic functionality.

If you are a beginner and yet to know about forms of programming language and where C resides in the world of Programming, the following two articles are just right for you,

If you do not have any idea of Unix Shell/ Windows Powershell or Mac OS Command Line, I recommend you complete this crash course on Command Line, Command Line Crash Course.

At this point, I assume that you are aware of Computer Programming, High Level languages and Command Line.

Please don't prove my assumptions wrong. Because, they are the strong base you will be requiring throughout all the subsequent articles.

Now, I want to be very frank on my writing rules,
  • While writing any article, I assume that you are in front of me and you may have asked me ta question and I will answer that question for you. Questions are generally marked bold while my answers to them are in plain text. That may be weird way of writing. But that's the best way I can explain things in minute details.
    For example, look at this article on data, Data. Once you go through it, you will definitely understand what I mean.
  • Sometimes articles are too long. No way, you have to bear with them.
  • Most of the articles will be having real code examples and the output.
  • Although you will see the output in the article, I recommend you to write them on a notepad, save it, compile and run it to see the results yourself rather than relying on me.
  • Practice makes a man perfect. So, practice every day. If you are stuck with anything, comments are welcome. I will try to reply on your comment as soon as possible.
  • Wherever necessary, there will  be a section named Source Code Distribution. This section will details about the source code discussed in the article. You can download the source code and can verify the same with your program. But it is not recommended to directly download and use it for your purposes. That will actually defeat the purpose of learning.

I think after reading all these, some people will surely go back and check some other website. If you are still reading this, 'Welcome reader, I thank you to be here' and we'll start our discussion on C++ in the next article.

Introduction to C++

C++ is a middle level language developed by Bjarne Stroustrap. He started the development of this language in 1978 at  AT&T Bell Labs. This language is based on C programming language and most of the syntax is inherited from this language itself. In fact, C++ can be imagined as a superset of C. So, a valid C program is also a valid C++ program.

C++ actually supports multiple paradigm like Imperative Programming, Object oriented Programming and Generic programming features. C++ also provides features to support low level memory manipulation. That is why C++ is recognized as middle level languages.

In fact C++ resides in the below scale,

Pic Courtesy: Codecommit

This picture defines the implementations of different type of languages, So, we can definitely understand that, C/C++ comes into the area where we can deal with memory and can also write programs in such a way that we don't care about memory.

In fact most of OS kernels (the bridge between hardware and software) are written in C/C++. To know more, you can read this article.

While reading this article, you can know where C/C++ resides in the world of Software Programming.

After reading this you may want to know how you can write programs using C++.

To achieve this, the first thing you will require is a compiler. The details of this is mentioned in C/C++ installation. You must go through this article and complete all the steps to continue writing programs in C++.