CS 70

Building Programs from Multiple Files

Before You Start…

Form a group of about three or four people.

Then, do the following:

  1. Pick a lab machine to work on. You'll need to all be positioned so you can see the screens and potentially take the keyboard.
  2. Find out your group number. Prof. Melissa will hand out a piece of paper with your group number on it.
  3. Have one person in the group open Visual Studio Code, and sign into the course server.
  4. Choose the “Open Folder” option and select and navigate to: /cs70/fall2025/week3lab2/sect2/group1 (replace group1 with your actual group number, and note the leading slash, this is not in your own directory).

The Task

In the directory there are several files (allcaps.cpp, allcaps.hpp, exclaim.cpp, exclaim.hpp, and shout.cpp). Together they can be used to create a program. Your task is to build that program. To do so, you will need to:

  • Figure out how the files depend on each other, and which one contains the main function.
  • Add missing #include directives to the files so that each file includes the header files it needs.
  • Compile the files into object files.
  • Link the object files into an executable.
  • Run the executable to see what it does.

When you've done that, you can either work on finishing Homework 2 or start on Homework 3.

(When logged in, completion status appears here.)