CS170 Make - gdb - 2-Dimensional Array Lab Exercise

This lab exercise might appear a little long, but each of the three parts to it are quite simple. Be sure to read the lab notes before you start and follow the directions in this exercise carefully.

gdb Debugger Exercise


Make Exercise

If you do not still have the files from last lab's Calculatr project ( Calculatr.cpp    DoMenu.cpp    GetOperands.cpp    AddNums.cpp    ModNums.cpp    and    Calculatr.h ) set yourself up now with these commands: This simple exercise is designed to simply introduce you to Makefile.

2-Dimensional Array Programming Exercise

The program you will work with is a simple one, but it is spread out over several files. i.e. AdditMain.cpp    InitArray.cpp    and AdditHeader.h     The idea is that the main function, AdditMain.cpp, is the controller for the program to add two 2-dimensional arrays. Each of the functions for the program - initialize, add, and print - will be in separate files. You will be creating two files, AddArray.cpp and PrintArray.cpp.

To make this easier to work with, create a directory for the files by entering something like: mkdir AdditPgm - you can chose whatever directory name you like, and put it wherever you like in your Hercules disk space. These instructions will use the directory name AdditPgm


CS Dept Home Page
CS Dept Class Files
CS170 Class Files

Copyright: Department of Computer Science, University of Regina.