Welcome to C++: Performance and Control
C++ was created by Bjarne Stroustrup in the early 1980s as an extension of the C language, adding object-oriented features while keeping C’s close-to-the-hardware performance. It compiles directly to native machine code and gives you fine-grained control over memory — this combination of speed and control is why C++ powers game engines (Unreal Engine is written in C++), operating system components, high-frequency trading systems, and performance-critical software of almost every kind.
C++ asks more of you than Python, JavaScript, or even Java. There is no automatic garbage collector cleaning up memory behind the scenes by default, and mistakes with pointers can crash a program in ways that are genuinely harder to debug than an error message in a higher-level language. In exchange, you get a level of control over exactly how your program uses memory and CPU time that those other languages simply do not expose. This trade-off is deliberate, and understanding why it exists will make the rest of this course click into place.
Installing a compiler
On Linux, g++ is usually already installed or a single package-manager command away. On macOS, install the Xcode Command Line Tools, which include clang++ (a compatible alternative to g++). On Windows, MinGW or the full Visual Studio both work. Confirm your compiler is available with:
g++ --version
Your first program
#include <iostream>nnint main() {n std::cout << "Hello, Tutoline!" << std::endl;n return 0;n}
Save this as hello.cpp, compile it with g++ hello.cpp -o hello (this produces an executable file named hello), then run it with ./hello on macOS/Linux or hello.exe on Windows.
Understanding the pieces
#include <iostream> pulls in the input/output library, which provides std::cout for printing to the console. Every C++ program needs a main() function as its entry point, and return 0; signals to the operating system that the program finished successfully — a nonzero return value conventionally signals an error occurred.
What you’ll build across this course
By the end of this course you’ll understand functions and pointers, the containers and algorithms of the Standard Template Library, object-oriented programming with classes, and the memory management concepts — including modern smart pointers and move semantics — that separate a beginner C++ programmer from someone who can work confidently in a real C++ codebase.
Notice the two-step process: compile, then run. This is different from Python or JavaScript, which run source code directly without a separate compilation step.