C++ is a multi-paradigm programming language that supports object-oriented programming (OOP), created by BJarne Stroustrup in 1983 at Bell Labs, C++ is an extension(superset) of C programming and the programs written in C language can run in C++ compilers.
Uses of C++
C++ is used by programmers to create computer software. It is used to create general systems software, drivers for various computer devices, software for servers and software for specific applications and also widely used in the creation of video games.
Object-oriented Programming and C++
C++ supports object-oriented programming (OOP), with four major principles of object-oriented development:
C++ is not purely object-oriented language because object-oriented means to works with object and classes, but in C++ you can write code without creating a class.
Features of Object Oriented C++
- The main focus remains on data rather than procedures.
- Object oriented programs are segmented into parts called objects.
- Data structures are designed to categorized the objects.
- Data member and functions are tied together as a data structure.
- Data can be hidden and cannot be accessed by external functions using access specifier.
- Objects can communicate among themselves using functions.
- New data and functions can be easily added anywhere within a program whenever required.
- Since this is an object-oriented programming language, it follows bottom up approach, i.e. the execution of codes starts from the main which resides at the lower section and then based on the member function call the working is done from the classes.
Object oriented approach is a recent concept among programming paradigms and has various fields of progress. Object oriented programming is a technique that provides a way of modularizing programs by creating memory area as a partition for both data and functions that can further be used as a template to create copies of modules on demand.
Standard Libraries in C++
C++ standard library was created after many years and it has three important parts:
- C++ core language provides all the building blocks including data types, variables and literals etc.
- The C++ Standard Library has rich set of methods to manipulating files and strings.
- The STL(Standard Template Library) provides a rich set of template classes for manipulating data structures.
ANSI Standard for C++
ANSI stands for American National Standard Institute & the ANSI standard began an attempt to ensure that C++ codes become portable – that code written for Microsoft’s compiler will compile without having any errors can run on compilers of MAC or Linux or any other compiler. So, all major C++ compilers support the ANSI Standard.