C++ Tutorial

Learn C++, a fast, powerful language with object-oriented and generic programming, used for games, systems and competitive coding.

C++ was developed by Bjarne Stroustrup at Bell Labs starting in 1979, originally as "C with Classes". It's a superset of C (with minor exceptions) that adds classes, templates, exceptions and the Standard Template Library (STL).

First C++ Program

C++
#include <iostream>
using namespace std;

int main() {
    cout << "Hello, C++!" << endl;
    return 0;
}
Hello, C++!

C vs C++

CC++
ProceduralProcedural + object-oriented + generic
No classes, no function overloadingClasses, overloading, templates
printf/scanfcout/cin streams
malloc/freenew/delete
No referencesReferences (int &r = x;)
No exception handlingtry/catch/throw
Track your progress through the C++ course