For this assignment we will assume that your stack

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: lab in just one single file called Lab2.cpp. Task 1 – Setting up variables Set up a constant global int variable that indicates the capacity of your stack. For this lab, set the capacity variable to be 10. If you do not know what a “constant global” variable is, please refer to your last lecture slides. The capacity variable indicates the maximum number of numbers your stack can contain at any one time. Now, in the main function, declare an int array of length equal to the capacity variable. For this assignment, we will assume that your stack can only contain non- negative integers. You should also initialize an int variable that represents the number of elements in the stack. Let us call this the size variable. This varia...
View Full Document

This lab report was uploaded on 03/02/2014 for the course CS 200 taught by Professor Fareedzaffar during the Winter '11 term at Lahore University of Management Sciences.

Ask a homework question - tutors are online