C plus plus Programming Language

Why Trust Techopedia

What Does C plus plus Programming Language Mean?

C++ (said C plus plus) is an object-oriented computer language created by notable computer scientist Bjorne Stroustrop as part of the evolution of the C family of languages. It was developed as a cross-platform improvement of C to provide developers with a higher degree of control over memory and system resources.


Some call C++ “C with classes” because it introduces object-oriented programming principles, including the use of defined classes, to the C programming language framework. Over time, C++ has remained a very useful language not only in computer programming itself, but in teaching new programmers about how object-oriented programming works. However, it does not support only object-oriented, but also procedural and functional. Thanks to its high flexibility and scalability, C++ can be used to develop a broad range of software, applications, browsers, Graphical User Interfaces (GUIs), operating systems, and games.

Today C++ is still very appreciated for its notable portability which allows developers to create programs that can run on different operating systems or platforms very easily. Despite being a high-level language, since C++ is still close to C it can be used for low-level manipulation due to its close relation with machine language.

Techopedia Explains C plus plus Programming Language

Bjarne Stroustrup developed C++ at Bell Labs in the early 1980s to merge the best advantages of several other languages. He wanted to put together the quickness of BCPL, the high-level of Simula, and the universality of Dennis Ritchie’s C. He took inspiration from other languages as well, such as Ada, ML, and ALGOL 68, to create a well-structured, general-purpose language that could compile nearly all C programs without changing their source code. C++ is so flexible that is often nicknamed the "Swiss Pocket Knife of Programming Languages" (although this nickname is shared by Python as well).

C++ and Object-Oriented Programming

When C++ was new, object-oriented programming was just coming on the scene. This revolutionary type of computer programming transformed the coding world with its promise of more sophisticated virtual data types and objects.

In object-oriented programming, an object is a data type that has both data and functions inherent in its design. Prior to the advent of object-oriented programming, programmers typically saw a codebase as composed of individual command line instructions. The identification of objects with data and functions built in led to a new way of packaging and automating code work.

The C++ Stack

For an excellent example of object-oriented programming in C++, one of the most notable and useful features of the language was the C++ stack.

The C++ stack is a class in C++ that has the following characteristics – it is a virtual last in first out sequential storage container that has a defined set of elements. The functions ‘push’ and ‘pop’ either push a new item into the bottom of the stack or pop the first available item from the top of the stack.

Programmers have utilized the C++ stack in many different ways to achieve goals involving variable evaluation and functional operations within a codebase.

The language also applies principles of encapsulation, which identifies usage models, and inheritance, where one class can inherit certain attributes or properties from another.

Disadvantages of C++

C++ shares some of the infamously hard to understand concepts that characterized C. In particular, pointers are a challenging concept to grasp, and their misuse may lead to system crashes and abnormal memory consumption. The lack of a garbage collector also makes hard to filter out unnecessary data. Another limit to C++ is the presence of security issues associated with the availability of pointers, global variables, and friend functions.


Related Terms

Margaret Rouse
Technology Expert
Margaret Rouse
Technology Expert

Margaret is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages.