In this first lab you'll outfit your computer with a code editor and C++ compiler, familiarize yourself with the command line interface, and adjust to the socially distanced lab environment.
While we will make heavy use of the zyBooks online code editor throughout the semester, it is limited in what it offers (e.g., it's not useful for one of the later units on file processing and makes interaction difficult) and it is not what you'll be using for programming assignments. In addition, one of the learning objectives of this course is to give you experience using a command line interface on your computer (e.g., Terminal, cmd, PowerShell, etc.). This lab will get you set up with the tools and C++ development pipeline.
By the end of this lab, you should feel comfortable:
- installing Visual Studio Code and a C++ compiler on your computer
- going though the steps of the C++ pipeline: writing code, compiling it, and running the executable
- using the command line to navigate to a directory, compile code, and run an executable
Before the lab begins, find one or two partners. You need to be socially distanced, but close enough that you can converse with each other. You will each complete Part 1 on your own (but feel free to ask each other for help). Complete the worksheet in Part 2 together.
Part 1: Install a text editor and C++ compiler
See the instructions for downloading Visual Studio Code and a C++ compiler linked to from the Software page. After installing the compiler, be sure that you test it by closing then reopening your terminal and typing "g++". If it installed correctly, you should get an error message that no input files were specified. If you have any questions, please contact me or a classmate.
When you've done this, call me over and share your screen with me so I can check what you've done. Use the class Zoom link listed in the Class Resources document.
Part 2: The Command Line Interface & VS Code Live Share
One person from your group should make a copy of this worksheet. That person will be the scribe and is in charge of writing responses. The scribe should share the document with the others. Complete the worksheet with your group (each person should carry out the steps).
Each of you should submit a copy of the worksheet from Part 2.