C Plus Plus

HomePage | Recent changes | View source | Discuss this page | Page history | Log in |

Printable version | Disclaimers | Privacy policy

C++ is an object-oriented programming language based on C, developed by Bjarne Stroustrup at Bell Labs in the 1980s. It was finally standardized in 1998 (ISO/IEC 14882-1998 "Information Technology - Programming Languages - C++"). In addition to its support for object-oriented programming, C++ is distinguished from C by its support for generic programming and template metaprogramming through the use of templates.

The name of the language, written "C++" and pronounced "see plus plus", signifies the fact that the language evolved from C. It was suggested by Rick Mascitti in mid-1983, about the time the language was first used outside a research organization. Earlier the language had been referred to simply as "C with Classes".

The name is an inspired pun, which plays on an idiom of C (where the double plus sign is an operator that has the effect of incrementing the value of a variable) along with the common naming convention of appending a single plus to indicate an enhanced version. According to Stroustrup: " '++' is the C increment operator...the name signifies the evolutionary nature of the changes from C". Employing the pun also avoided the problem that "C+" had already been used for an unrelated language (not to mention that it is commonly associated with an evaluation of less than stellar academic performance).

Some C purists, noting that in C the value of the expression "C++" is actually the original, unchanged value of "C", have suggested that "++C" would have been a more accurate name. (If x=3, then if you say "y=x++" you end up with y equals 3, x equals 4. If you say "y=++x" you end up with y equals 4, x equals 4.)

Bjarne Stroustrup maintains a list of frequently asked questions about the language.

Example Program

#include <iostream>

int main()
    std::cout << "Hello, world!" << std::endl;
    return 0;