What is C++?
C++ is a powerful, high-performance programming language created by Bjarne Stroustrup in 1979 as an extension of C. It supports both low-level memory manipulation and high-level abstractions like classes and templates.
C++ is used for systems programming, game engines, embedded systems, competitive programming, and performance-critical applications.
- High performance — close to hardware
- Multi-paradigm: procedural, object-oriented, generic
- Rich standard library (STL)
- Used in game engines (Unreal), browsers (Chrome), and OS kernels
- Backward compatible with C
Your First C++ Program
A basic C++ program includes headers, uses the std namespace, and has a main function as the entry point.
Example
#include <iostream>
using namespace std;
int main() {
cout << "Hello, World!" << endl;
return 0;
}
// Compile: g++ -o hello hello.cpp
// Run: ./hello 