Skip to main content

Pre-requisites


Experience

We assume that you already have some experience of programming in another language. Specifically, you should know how to create and use variables and how to write conditional statements and loops. You should also understand how programs can be structured using functions and procedures/subroutines.

If you don't already have this experience, you should first study either of the companion courses on Python or Fortran programming.

Software Requirements

A C++ compiler

  • This course uses the freely-available GNU C++ compiler (other compilers can be used but you will need to adjust the compiler commands accordingly)
  • Any relatively recent version of GNU C++ will do; the course materials have been tested using versions 4.4 and 4.7
  • If you use Linux, GNU C++ may already be available on your system (enter g++ on the command line to find out); if not, you can install it using your Linux distribution's package manager
  • If you use Mac OS X, you will need to download Apple's Command Line Tools for Xcode (note: Apple Id required)
  • If you use Windows, one of the following is recommended:
    • Install MinGW if you just want the compiler and associated tools
    • Install Cygwin if you want a more complete Linux-like environment, supporting a wider range of command line tools

A text editor aimed at programmers

  • Simple text editors such as Window's Notepad can be used but are not ideal as they provide no special features to help programmers
  • A good free programmer's editor for Windows systems is Notepad++
  • Sublime Text is an excellent commercial (but relatively cheap and liberally licensed) editor that works on Linux, Mac and Windows systems
  • Vim and Emacs are very powerful free cross-platform editors with excellent support for programming, but note that they are keyboard-driven and have a significant learning curve
  • Word processors are unsuitable for programming!

A command line environment

  • We assume a command line environment throughout this course - for example, we provide compiler commands that should be typed in such an environment
  • On Linux systems, this is provided via a terminal window (xterm, gnome-terminal or one of the many others available for Linux)
  • On Mac OS X, you can use the built-in Terminal application
  • On Windows systems, you can use the built-in Command window (cmd.exe) or the shells provided by MinGW or Cygwin
  • We will refer to the command line environment throught this course as a terminal window, regardless of its actual nature