XClose

COMP0210: Research Computing with C++

Home
Menu

Week 3: Overview

This Week

This week we’ll be looking at how to work with larger and more complex C++ projects. We’ll cover approaches to error handling in C++, including exceptions, how to manage building significant projects using C++ and work with an external library, and how to test our code rigorously.

  • Exceptions
    • Error handling basics
    • Exception types
    • Try and Catch statements
    • Defining our own Exception types
  • Other Error Handling Mechanisms
    • Error return codes
    • Optional types
  • CMake Basics
    • Basics of CMake files
    • Project directory structure
    • Setting C++ standards
  • Unit Testing
    • Installing the Catch2 testing library
    • Adding Catch2 to your CMake files
    • Testing Strategy
    • Writing tests

If you would like more detail on CMake and build systems, you can read the following optional notes. These are not necessary to do this week’s exercises, but may be useful during the course and assignments.