Pages

Showing posts with label Introduction to CPP. Show all posts
Showing posts with label Introduction to CPP. Show all posts

Sunday, 9 September 2012

Learn C++

Introduction to CPP

Introduction

Welcome to the first module in CPPcourse. In this module you will be introduced to the Origin of C++, the basics of the language and differences between C and C++. You will also learn how to use variables and expressions in C++. These fundamental concepts are the essential building blocks that you will use to create C++ programs throughout the rest of this course

Learning Objective


By the end of this module you will be able to:
  • Identify differences between C and C++
  • Demonstrate the capability of programming in C++
  • Apply C++ syntax, New/Delete and Reference operations

Origin of C++

Bjarne Stroustrup is the inventor of C++. He began to work on C with Classes in 1979. The idea of creating a new language originated from his experience in programming for his Ph.D. thesis. He found that Simula (another programming language) had features that were very helpful for large software development, but the language was too slow for practical use.
Stroustrup set out to enhance the C language with Simula-like features. C was chosen because it is general-purpose, fast, and portable.

The name C++

This name is credited to Rick Mascitti (mid-1983) and was first used in December 1983. Earlier, during the research period, the developing language had been referred to as "new C", then "C with Classes".

Features of C++

Compared to the C language, C++ introduced extra features, including declarations as statements, function-like casts, new/delete, bool, reference types, inline functions, default arguments, function and operator overloading, namespaces and the scope resolution (::) operator, classes (including all class-related features such as inheritance, member functions, virtual functions, abstract classes, and constructors), templates, exception handling, runtime type identification, and the overloaded input (>>) and output (<<) operators for input and output respectively.
For more information Read

Differences between C and C++

The main difference between C and C++ is that C is a procedure oriented language where as C++ is an object oriented language we can compile and execute all our C programs in a C++ compiler, C++ is an extension to C. C++ was first called 'C with classes' the ++ in C++ indicates the increment operator in C meaning C++ is an advanced language compared to C. The advantage of C++ lies in object oriented programming generally called OOPs. The features of OOPs are Classes, Data Abstraction, Encapsulation, Inheritance, Polymorphism, Exception Handling etc...,