Skip to content
Justice Tech School

C++ Get Started

Install g++, clang or Visual Studio. Compile with g++ -std=c++17 hello.cpp -o hello and run ./hello. Files end in .cpp.

Example
#include <iostream>
int main() {
    std::cout << "Hello World\n";
    return 0;
}

// Terminal:
//   g++ -std=c++17 -Wall hello.cpp -o hello
//   ./hello

Exercise

Choose the standard.

g++ -std= hello.cpp

Quiz Test

Which extension do C++ sources use?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.