I find it very odd that your teacher won't explain this in a way you can understand. At any rate I'm not sure how useful I can be. Anything I say is basically my interpretation of what you've written meanwhile it's the teacher's assignment and the teacher is the best source for clarifacation you have.
Quote:
First, the file starts with an S... so do I just ignore the first term since there is nothing above it?
My opinion is that there is enough information there to do at least 1 round of calculations, even if the line is an S line. In other words it's a stack of one thing.
Quote:
2/15/1995
10,000 shares * 3.71 = 37,100
Quote:
And since there are multiple S's, what exactly do I process?
The instructions say:
Quote:
2. Reads the data in the file into a stack. Each time an S is encountered process data if possible and display the results(see example below), otherwise display an error message.
A stack is a data structure. B lines will just become part of the stack. So if you encounter an S line, you have to add it to the stack and then display the output. To display the output, first you have to pop data off of the stack in turn. When you have popped off everything, you can continue reading the file.
Quote:
Would I need multiple stacks or is one enough?
I think it's up to you if you use the same instance or destroy the stack after dealing with each S line.
Quote:
-Lastly, were supposed to use #include "stacks.ADT"
Please include files with the .h extension. Your compiler knows what to do with them.