Question: How can I push my student object onto my stack? My student class has different data types (string,int,string,int) for a student record. There are 15

How can I push my student object onto my stack? My student class has different data types (string,int,string,int) for a student record. There are 15 student records in an array and Id like to take those records and push them onto the stack. My thoughts are to use a for loop and simply say studentStack.push(studentRec[i]) and place the one record into one slot on the stack and the stackSize being the same size as the array.

Here is the staticStack class with member functions including my push function:

How can I push my student object onto my stack? My student

here is my push function:

class has different data types (string,int,string,int) for a student record. There are

And here is my student class and member functions:

15 student records in an array and Id like to take those

class staticStack private: int *testscores; //Pointer to avg test scores iutmstackSizeu. int top; public: //Constructor taticStack(int); ICopy constructor staticStack (const staticStack &); //Destcuctoc staticStack(); //stack operations void push void pop (int &); bool isFull() const; bool isEmpty() const; 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!