Thursday, December 10, 2009

My Tryst With C++

I completed my graduation in Computer Science and Engineering. During the first semester in college, we learned both C and C++ and Pascal too. Out these,C++ caught my attention. I was fascinated by the very structure of the language. It was different from both C and Pascal. The main difference was that it was an Object Oriented Language. C and Pascal were the traditional structured language. As the subject was very interesting,I spent hours to learn C++ and even taught my friends.Let me tell you something about it and clarify why it is different from other traditional programming languages. C++ is composed of classes and their instances named objects. Every real world thing is seen as a class in C++. A class is nothing but a unit containing the data and the method which would operate on the data. Since, both the data and methods are capsuled in a unit, it is absolutely safe from outside access. This is the main difference between C++ and C (or Pascal). In C, a data is not safe as any method or function can access it whenever it needs it. We cannot do anything only with class as a memory space is reserved only when a class is intantiated to produce an object.

0 comments:

Post a Comment