What is C++?
A free lesson from Swipe Coding · C++, level 1 · updated October 2026
By the Swipe team, founded by Colin · how we make lessons
C++ (pronounced "C plus plus") is a powerful, general-purpose programming language used to build everything from video games to web browsers to operating systems. It gives you fine-grained control over how a computer uses its memory and processing power — more control than most other popular languages.
#include <iostream>
int main() {
std::cout << "Hello, C++!";
return 0;
}What does this program print when it runs?
#include <iostream>
int main() {
std::cout << "Hello, C++!";
return 0;
}C++ is a "compiled" language: a program called a compiler translates your code directly into machine code — the native instructions a processor understands — which is then packaged into an executable file. Unlike some other languages, C++ does not run inside a virtual machine; once compiled, your program runs straight on the operating system, using the computer's hardware directly.
C++ programs run inside a virtual machine, similar to how some other languages work.
C++ supports multiple styles of programming. It can be used in a strictly step-by-step ("procedural") style, but it is best known as an "object-oriented" language — meaning you can build programs out of reusable building blocks called objects, similar to how many modern languages work.
A C++ program is translated into machine code by a ____, and does not run inside a virtual machine.
Keep your streak going in Swipe Coding
Swipe through every level of C++ on your iPhone — with XP, stars, streaks, a personal advisor and the full track beyond these free levels.
Get the Swipe apps →