Resources

Getting C++ Running

There are two great ways to create C++ programs in this course: on SFU computers, or on your own computer.

Option 1: Using CS's "CSIL" Lab Computers

  • Guide to using C++ in the CSIL labs.
  • As a student in this course, you have 24-7 access to the CSIL labs in Surrey and Burnaby:
    • Surrey: SRYE 3024, SRYE 4024, SRYE 4013
    • Burnaby: ASB building, 9700, 99804, 9820, 9839, 9840.

I have requested that VS Code be installed in all of SFU's general computer labs. Once this is done, from in any of those labs you can follow the remote SSH guide (just like for Windows, Mac or Linux).

Option 2: Using Your Own Computer

To write programs in this course, we need two things:

  1. An IDE (Integrate Development Environment)
    A program where you write your C++ code (for example, VS Code is recommended).
  2. A Compiler
    A program that takes our .cpp files and makes them into files (executables) which the computer can run ("execute").

There are numerous options for how to get this working on your computer! Expand one of these sections:

Windows (Click to expand)
  1. Use Dev Containers (Recommended)
    Straight-forward Install: VS Code runs on your computer, and you run Docker Desktop to easily run the compiler on your computer too.
  2. Remote SSH into CSIL (Recommended)
    Easiest Install: VS Code runs on your computer, but you use the compile on an SFU CS computer.
  3. Virtual Desktop to CSIL (Recommended)
    No install, easy use: Graphical desktop through your web browser via the SFU CS server.
  4. Use Windows Subsystem for Linux
    More complicated install: Inside of Windows, you run a version of Linux that has the compiler.
Mac (Click to expand)
  1. Use Dev Containers (Recommended)
    Straight-forward Install: VS Code runs on your computer, and you run Docker Desktop to easily run the compiler on your computer too.
  2. Remote SSH into CSIL (Recommended)
    Easiest Install: VS Code runs on your computer, but you use the compile on an SFU CS computer.
  3. Virtual Desktop to CSIL (Recommended)
    No install, easy use: Graphical desktop through your web browser via the SFU CS server.
  4. Native Mac Install
    Install VS Code and the compiler natively under Mac OS.
Linux (Click to expand)
  1. Use Dev Containers (Recommended)
    Straight-forward Install: VS Code runs on your computer, and you run Docker Desktop to easily run the compiler on your computer too.
  2. Remote SSH into CSIL (Recommended)
    Easiest Install: VS Code runs on your computer, but you use the compile on an SFU CS computer.
  3. Virtual Desktop to CSIL (Recommended)
    No install, easy use: Graphical desktop through your web browser via the SFU CS server.
  4. Native Linux Install
    Install VS Code and the compiler natively under Linux.
Discussion about Other Tools (Click to expand)

You can use any C++ editor and compiler you like for your course, so feel free to use another tool. VS Code is chosen as a standard for SFU SoSy first year courses because

  1. It is very powerful: it supports many programming languages, it is extensible with a large number of modules, and it is commonly used in industry.
  2. It does not add a lot of project overhead.

Some other tools to mention include:

  • Visual Studios (community edition): A powerful full-feature IDE often used in industry and includes both the IDE and compiler in a reliable and usable single install. Free version available to students. It only runs on Windows so it's not a great choice for the course to support overall. It also adds some project configuration overhead.
    • If you want to run the full version of Visual Studios (instead of VS Code), download the Community version. When it prompts you to "Choose workloads" select "Desktop Development with C++"; the default components should be fine.
    • Once you've installed and opened Visual Studio and you want to write a program:
      • Select Create New Project
      • When prompted to select a project template choose Console app - don't select Empty Project
      • Work your way through the rest of the Create new project wizard - mostly this entails giving your project a sensible name, I would suggest avoiding names that contain spaces.
      • Once you've finished it you will be presented with a .cpp file that prints a Hello World message. Edit this to write your own program. When submitting your files, ensure you submit the .cpp, not any of the project files. You must ensure your code builds with the g++ compiler that is recommended for use in the other methods.
  • CLion with MinGW: Powerful full-function IDE. Has poor support for connecting integrated debugger to a program which uses cin. Adds project configuration overhead.
  • Eclipse with MinGW: Powerful full-function IDE. Has poor support for connecting integrated debugger to a program which uses cin. Adds project configuration overhead.
  • Cloud Development Environments (CDEs): Such as GitHub's Cloud Space, Git Pod, Replit. These systems give you an IDE in your browser, and run the compiler and programs on a cloud server. Allows easy configuration of complex build environments. However, can require paid subscriptions if using too much could time, and an extra level of complexity when setting up projects and accessing your files.
  • Dev Containers (Remote): Dev containers can be used to run a workspace on a remote server. However, this is somewhat similar to the suggested remote SSH approach, but adds an extra burden on the remote system to support Docker. It does allow complex project build environments on a remote system, but not needed for our intro courses.





Online & Other Resources

  • Suggested: C++ style guide for CMPT 130. You need not conforming to everything it mentions, but it's a good style to follow.
  • W3Schools free online C++ tutorials.
  • The following suites of tutors were designed to help students learn to do so by solving problems:

C++ Online Textbook

Custom YouTube Video List

List of videos created by Dr. Brian related to course material.

Resources