cpp history

C++ history

c++ is an object oriented programming language. It was developed by Bjarne Stroustrup at AT&T Bell Laboratories in Murray Hill, New jersey, USA in the early 1980’s Stroustrup, an admirer of simula67 and a strong supporter of c, so wanted to combine the best of both the languages and create a more powerful language that could support object oriented programming features, and the c++ is the extension of c language with the major addition of oops concept and the stroustrup initially called the news language c with classes. and however later in the 1983 the name was changed to c++, so the idea of c++ comes from the c increment operator(++).

c++ is as superset of c, therefore almost all c programs are also c++ programs. However there are a only few minor differences that will the prevent a c language program to run under c++ language compiler. we shall see these differences later as they are encountered. A comprehensive list of major difference between ASCI C and ANSI c++

So the most important facilities that c++ adds on to c are classes, inheritance, function overloading, and operator overloading, These all features enable creating of abstract data types, inheritance properties from exiting data types and support polymorphism, there by making c++ and truly object oriented language.

The object oriented features in c++ allow programmers to build large programs with the clarity, extensibility and ease of maintenance, incorporation the spirit and efficiency of c. The addition of new features has transformed c from a language that currently facilitates top down, structure design, to one that provides bottom up, object oriented design

Application of c++

since c++ is a versatile language for handling very large programs. it is suitable for virtually any programming task including development of editors, databases, compilers, communication system(chat) and any complex real life application system

1. since c++ allows us to create hierarchy related objects, we can build special objects oriented libraries which can be used later by many programmers
2. c++ programs are eaisly maintainable and expandable, when a new feature needs to be implemented, it is very easy to add to the existing structure of an object
3. so it is expected that c++ will replace C as a general purpose language in the near future.

The principal advantages are

1 Through inheritance, we can eliminate reduce the code and extend the use of existing
2. classes.
3. we can build program from the standard working modules that communicate with one another, rather than having to start writing the code from scratch. This leads to saving of the development time and high productivity.
4. the principal of data hidden helps the programmer to build secure programs that cannot be invaded by code in other parts of the program.
5. It is possible to have number of instances of an object to co exist without any interference.
6. It is possible to map objects in the program domain to those in the program.
7. It is also easy to partition the work in a project based on objects.
8. The object oriented system can be easily upgraded from small to large systems.
9. Software complexity can be easily managed.

Example with the simple program with print String

#include <iostream>
using namespace std;
int main()
{
cout<<"C++ is better than c \n"; //C++ statement
}

  • C++ Dynamic Initialization of Objects
  • C++ Copy Constructor
  • C++ Dynamic Constructor
  • C++ Destructors
  • C++ Exercise
  • C++ Operator Overloading
  • C++ Overloading Unary Operators
  • Const pointer in C
  • Void pointer in c
  • C++ Overloading Binary Operators
  • C++ Overloading Binary Operators Using Friends
  • C++ Manipulation String Using Operators
  • C++ Rules for overloading operators
  • C++ Exercise
  • C++ Basic To class Type
  • C++ Class TO Basic Type
  • C++ One class To another class type
  • C++ Exercise
  • C++ Inheritance introduction
  • C++ Single Inheritance
  • C++ Multiple Inheritance
  • C++ Ambiguity Resolution in inheritance
  • C++ Hierarchical Inheritance
  • C++ Hybrid Inheritance
  • C++ Virtual Base Classes
  • C++ Exercise
  • C++ abstract class
  • C++ nesting of classes
  • C++ Exercise
  • C++ polymorphism
  • C++ Exercise
  • C++ pointers
  • C++ Pointers TO object
  • C++ this pointer
  • C++ Pointer to Derived class
  • C++ Virtual functions
  • C++ Exercise
  • C++ streams
  • C++ unformatted I/O operations
  • C++ Put() and get()
  • C++ getline() and write()
  • C++ Formatted console I/O
  • C++ Manipulators
  • C++ Exercise
  • C++ file handling
  • C++ file stream classes
  • C++ Open and closing file
  • C++ open using constructor
  • C++ open using open()
  • C++ Detecting End of file
  • C++ File modes
  • C++ File pointers and Manipulators
  • C++ Sequential I/O
  • C++ Reading and Writing
  • C++ Updating a File
  • C++ Error handling In File
  • C++ Command Line Arguments
  • C++ Exercise
  • C++ Template introduction
  • C++ Class Templates with multiple Parameters
  • C++ Function templates
  • C++ Function templates with multiple parameters
  • C++ member function Template
  • C++ Exercise
  • C++ Exception handling
  • C++ Basics of Exception Handling
  • C++ Exception Handling Mechanism
  • C++ Throwing Mechanism
  • C++ Catch Mechanism
  • C++ Catch all Exceptions
  • C++ Re-Throwing An Exception
  • C++ Specifying Exceptions
  • C++ Exercise