C++ Fundamentals

This guide aims to provide you with the fundamentals of C++. It's not meant to be an exhaustive guide. For more in-depth details, you should refer to the official C++ referencearrow-up-right.

We do assume that you have basic programming knowledge and are cognizant of common programming constructs (i.e variables, functions, loops).

Getting started

To run C++ code, you will need a compiler. Alternatively, you can also use an online compiler like JDoodlearrow-up-right to follow along.

Mac

To check if you have the clang++ compiler installed, run:

clang++ --version

If not, you can install it via:

xcode-select --install

A software update window will pop up. You will need to agree to the licensing agreement before you can commence installing.

If all goes well, you should be greeted with:

Windows

On Windows, the setup process varies. The simplest option is to install an Integrated Development Environment (IDE) like Dev-C++arrow-up-right that bundles with a C++ compiler.

Ubuntu / Debian

To check if you have the g++ compiler installed, you can check via:

If it is not installed, you can install it via your favourite package manager.

Last updated

Was this helpful?