Your First C++ Program
Key points
- C++ is a compiled language: the compiler translates .cpp source code into machine code before the program runs.
- Every program starts in main; statements end with ; and blocks are wrapped in { }.
- cout with > reads input; both come from the iostream header and live in the std namespace.
- Compile with g++ -std=c++17 file.cpp -o name, and read compiler errors from the first one down.