Curriculum / C++ / Lesson 01

Introduction to C++

C++ was created by Bjarne Stroustrup in 1985 as "C with Classes" — it takes the performance and low-level control of C and adds object-oriented programming (classes, inheritance, polymorphism) plus a large standard library (the STL).C++ is widely used for game engines, competitive programming, high-frequency trading systems, and performance-critical software..

1 of 10
beginner 📖 4 min read 🎯 1 question

Introduction

C++ was created by Bjarne Stroustrup in 1985 as "C with Classes" — it takes the performance and low-level control of C and adds object-oriented programming (classes, inheritance, polymorphism) plus a large standard library (the STL).

C++ is widely used for game engines, competitive programming, high-frequency trading systems, and performance-critical software.

💡 Key insight C++ is (mostly) a superset of C — most valid C code is also valid C++ code.

Syntax

syntax
#include <iostream>
using namespace std;

int main() {
    // your code here
    return 0;
}

Example

cout ("character output") prints to the console; << sends data into the output stream.

cpp
#include <iostream>
using namespace std;

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

Try it yourself

Copy this example into the C++ compiler and run it — try changing a value and see what happens.

Quick Quiz

1. Which header is required to use cout and cin in C++?

Back to curriculum