Contents
This week we will introduce you to the basics of writing, compiling, and running a program using C++. We will go through most things for this class with live demonstrations, but you may find it helpful to read over the notes ahead of class anyway, and you can refer back to them throughout the course.
In this section we also provide notes on how to use the command line terminal and git if you have not done so before. We will be using the terminal every week (including the first week) to compile and run programs, among other things, and Git is a version control system that we will use throughout the course and for your coursework assignments. Be sure to read these through if you are not familiar with either of these topics!
- Introduction to C++ and “Hello World” Program
- Further C++ Syntax
- C++ Programs with Multiple Files
- Version control with Git
Useful References
- I’d highly recommend Bjarne Stroustrup’s A Tour of C++. This comes in many different editions, covering different standards of the language, so try to use one from
C++17onwards! This is available online from the UCL library services. - The C++ core guidelines are a fantastic resource for learning more about writing good quality C++ code, and some of the nitty gritty details of the language that can easily trip people up. It’s rather dense, so it’s best to use this to search for answers to questions you already have than just trying to read it through!!
- The Google C++ style guide is also interesting, and offers good explanations for their choices. If you do use this as a resource, don’t simply adopt their practices, but read their reasons first! Some of their reasons will absolutely not apply to you and the projects that you work on, so make sure that you’re always making informed choices.
Close