C++
C++ is a high-level, general-purpose programming language created by Danish computer scientist Bjarne Stroustrup. First released in 1985 as an extension of the C programming language, it has since expanded significantly over time; as of 1997 C++ has object-oriented, generic, and functional features, in addition to facilities for low-level memory manipulation. It is almost always implemented as a compiled language, and many vendors provide C++ compilers, including the Free Software Foundation, LLVM, Microsoft, Intel, Embarcadero, Oracle, and IBM.
See C++ on Wikipedia.
Getting started
Here is a Hello, World!
program file in C++, hello-world.cpp
:
#include<iostream>
using namespace std;
int main() {
cout << "Hello, World!";
return 0;
}
To compile a C++ program, use clang++:
clang++ hello-world.cpp -o hello-world
To run a compiled C++ program, run:
./hello-world
Screenshot: Hello, World! in C++ running in the Terminal
Keywords
- c
- compiled
- low-level
- oop
- object oriented