You have not defined a few components.
e.g.
you need to add a destructor
Stack::~Stack()
{
// stuff
}
etc.
StuXYZ
Practically a Master Poster
680 posts since Nov 2008
Reputation Points: 760
Solved Threads: 138
Sorry my mistake, I just read the error message and assumed.
Ok so I copied and compiled the code.
Here is what I had to fix.
(a) Size in the constructor needs to be size.
(b) Expand doesn't have an SS_2 variable and the last line
should be SS=SS_2;
(c) The guard in the assignment operator is mal formed
it should be if (this!=&RHS)
(d) In the same function, SS_2 should read SS.
(e) Stack::Push capacity is actually size
(f) That is it...
Don't think the code works but it does compile.... time for you to test....
StuXYZ
Practically a Master Poster
680 posts since Nov 2008
Reputation Points: 760
Solved Threads: 138