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 are 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.
C++ is used by many programmers of different types and coming from different fields. C++ is mostly used to write device driver programs, system software, and applications that depend on direct hardware manipulation under real-time constraints. It is also used to teach the basics of object-oriented features because it is simple and is also used in the fields of research. Also, many primary user interfaces and system files of Windows and Macintosh are written using C++. So, C++ is really a popular, strong and frequently used programming language of this modern programming era.
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 of 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 categorize 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 a 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.
The 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 a rich set of methods for 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.