C++

Updated: 04/26/2017 by Computer Hope
C++ characters printed on three-dimensional puzzle pieces.

C++ is a high-level programming language developed by Bjarne Stroustrup at Bell Labs beginning in 1979.

The original title of C++ was "C with classes." While a graduate student, Stroustrup was frustrated that available languages offered him either fast performance or high-level features for program organization, but not both. The lack of options inspired him to write a programming language.

He set out to create a programming language that compiles to lean, efficient code, and provides high-level abstractions to manage large development projects better. The language was later named "C++," a tongue-in-cheek reference to ++, an operator in C that increments a value by 1.

Since then, C++ has become one of the most widely-used languages in the world, especially in projects where performance comes at a premium. C++ continues to be updated and maintained; the current version is C++ 11, released in 2011.

Features

The syntax of C++ is largely inherited from the C language. It adds object-oriented programming features to its predecessor, such as classes, abstraction, encapsulation, inheritance, and polymorphism. It also provides functionality for function and operator overloading, generic programming facilities (such as the ability to create templates), and exception handling. C++ also features a robust STL (standard library) of useful data structures, algorithms, and input/output facilities.

Hello, World! in C++

Here is an example "Hello, World!" program in C++, using the I/O stream facility, part of the C++ STL.

#include <iostream>
int main()
{
  std::cout << "Hello, world!\n";
}

C, C#, GCC, High-level language, Portable language, Programming terms